wp: Digital Ocean Reserved IP Strangeness even if not the DNS Server, Litespeed fail, Cloudways ugh

oK, this is a strange one, so a quick note if you hit it. I’m trying to get a Digital Ocean WordPress up and no matter what I did it didn’t see to work. I”m using Netlify as the DNS Server but it would never recognize the new IP address that I had set up as a reserved IP.

It finally occurred to me that I had previously setup the Digital Ocean Domain’s and I had never changed the addresses there. So even though it is not used by the DNS Server system it is probably being used internally by Digital Ocean. That makes some sense (and not alot of sense at the same time). But it did solve the problem.

You are warned 🙂

Digital Ocean Litespeed WordPress installation fails

But when I tried to recover from UpdraftPlus, it totally broke. I think that since I have vanilla WordPress on tongfamily.com, it won’t just backup to a LItespeed WordPress site. But this seems to work with the vanially WordPress Ubuntu installation which is a nice one step.

If you are going to Updraft Restore to a new site make sure to disable 2FA first

This caused me real trouble. The 2FA is dependent on the server that you have so all your 2FA logins if you try to do a restore. You can set the wp-config.php with TWO_FACTOR_DISABLE but on Cloudways you have to figure out how to add it, but its better just to turn it all off before a restore.

Changing site names and swapping to a new server

This is actually a little tricky because you have to do it in the right order.

  1. Make sure that the new server has a dummy name, say new.com and it is working well. And the old server is working well at old.com
  2. Now comes the tricky part where we need to swap their identities, the tricky part is that if you do this incorrectly, you will lose access to one of the server. This is because changing the server url means that you can’t ever get back to wp-admin.
  3. So here’s, the trick login to new.com and get ready to change it’s name to old.com but DO NOT HIT ENTER.
  4. Then login to new.com and get ready to change it to old.com but DO NOT HIT ENTER
  5. The trick is that since you are already there, the DNS swap you are making has no effect on either server, so you can hit save and works.
  6. So now change the DNS Server swapping new and old.
  7. And this point, you can hit enter on both serves also changing those addresses
  8. Wait a bit and when the DNS adjust it should all work.

If you discover this doesn’t work, the you have to use the url https://_ip address_/wp-admin to get to the url and make a change. If this doesn’t work then you can:

  1. login to phpmyadmin and search for wp-options and then chance the Name, Site and Home URL.
  2. Alternatively you can ssh into the box and run a MYSQL command to change this.

If you have shared hosting service, and if you make a mistake, what can happen is the new site can point to the old url and then you can’t access the new site anymore. So to fix this requires a little work since you have to use cpanel to find Myphpadmin:

  1. If you are using a shared hoster, then you have to go to Inmotion Hosting AMP
  2. Then to Cpanel
  3. And finally login to MyPHPAdmin
  4. When you login there, search the database entry called wp_options and change the site_url and home back to old.site and it will all work again.

Cloudways Safe Mode

I’m not sure how I got into this mode, but it said that in safe mode you cannot authenticate with WordPress.com. I”m not sure I got into this mode, they talk about a plugin to activate it, but I’ve never such a thing.

Once I gained access I found that this is because on a restore JetPack gets confused and you have to create a new identity.

Cloudways UI overall is just pretty strange

I hate to say it, but I thought that it would be an improvement using Cloudways and that I would get the higher performance of a real underlying server compared with shared hosting, but this hasn’t turned out to be the case. Maybe its because I’ve gotten use to the Cpanel and raw Linux, but here are the strange things:

  1. They have two different interfaces Classic and New, so the instructions are really confusing are the double the normal of steps to get through
  2. Some of the controls are in Server administrations and Others are in Application administration, so basically, you have
  3. The security model is pretty weird. Basically, the default is there is a randomly assigned daemon which controls the files in ~/applications/_random name_/public/html for security but when you want to change wp-config.php you have to go back to either Server or Application and change ownership to your login name and presumably change it back. What a pain.
  4. Stopping the server is done in the Server administration

Changing a Cloudways WordPress url

This is not as simple as you would think since Cloudways is a managed system. Here is what you have to do:

Login to Cloudways and then go to Applications > Your WordPress installation > Domain Management and change the primary domain name by looking at the three vertical dots at the lower right and set Make Primary

Cloudways terminal is really clunky and paste is two steps.

The Digital Ocean console is pretty great, but the Cloudway terminal is first of all hard to find and then you can’t even copy and paste into it. Instead when you try to paste, only paste from browser is available so every step is two things.

Also it is a pure popup which means you have to grovel through Safari and enable popups. But you need it to check the wp-config.php assuming that you have done the ownership switch.

    Losing the Cloudways WordPress Password, must reset with WordPress new password, doesn’t work with 2FA

    Although they tell you the initial password, I ended up changing and losing it and the send email does not work by default. Sigh

    Cloudways has their own dedicated database editor, it is not PhPAdmin, you so can search for wp_users and then you can replaced the encrypted password.

    Even thought I tried restting the password using MD5 hash, I’m pretty sure this is no longer supported. So you need to find the PHP seed function. And you have to use a separate PHP Hash Generator that starts with $P$B and you can use various generators like Forge12.

    Then you can login into MySQLAdmin if it is instaleled, so you can run ran SQL statements to set your_user_name password to $P$B...... and it assumes the WordPress database prefix is wp_ which some security systems change.

    Note that this reset does not work if you have 2FA enabled, so do it just for accounts that don’t have this turned on. To reset the others, you have to login and and then reset the 2FA in their user and reset the password too.

    One interesting problem is that when trying to reset a password, the latest WordPress 6.7.1 compalins that the Nickname cannot be the same as the User name and this confused me because it complains but it looks like the save actually happened. I’m not really sure what a Nickname is. And amazingly it is not defined at least in google search, but it looks like the longer friendly name.

    UPDATE `wp_users` SET `user_pass` = "$P$B......" WHERE user_login="your_user_name"
    # Use this statement if you are logging in with an email
    UPDATE `wp_users` SET `user_pass` = "$P$B1OCiUEUFlJxmy0i3LKBidVs/ACxKm0" WHERE user_email="your_email_adress"

    Cloudways Database Manager is hard to find in Applications > Access Details??!

    This is the equivalent of Myphpadmin, but its hard to find, but for whatever reason, even though MySQL isn’t really a WordPress thing, you access it from the Applications section

    1. Go to Server, then click on the Applications there to start it.
    2. Now you go to Application Details. I have to say this is literally the last place I would put the database manager
    3. This is at the lower right of the screen, so hard to find
    4. When you search for the right table, for some reason it puts you in schema instead of the data so very non standard.
    5. Then as mentioned, they only have MD5 hash and you havle to go find the correct one on the web.
    6. The application is very strange, to edit a row, you click an edit text on each row, but it does accept the hash correctly.

    Resetting all passwords with 2FA

    This is tricky but if you have 2FA set to on, then you have to reset every each password. This is tricky as it will always ask what 2FA you want and at the bottom is skip. BY THE WAY, if you do then make sure your passwords are long and kept in 1Password

    Net, net, Cloudways really needs search and yes it does crash

    They have so many parameters buried everywhere, I’m not realy sure it is worth it. Since they don’t install phpMyAdmin and the terminal is so painful.

    Ugh, finally when I did the password reset, the entire WordPress installation just crashed. But worked the second time, so not a confidence builder.

    Leave a Reply

    This site uses Akismet to reduce spam. Learn how your comment data is processed.

    I’m Rich & Co.

    Welcome to Tongfamily, our cozy corner of the internet dedicated to all things technology and interesting. Here, we invite you to join us on a journey of tips, tricks, and traps. Let’s get geeky!

    Let’s connect

    Recent posts

    Loading Mastodon feed…