So this is the journey to update WordPress 3.2.1 to 5.3

I’ve taken a copy of the site and set it up on a temporary URL and set the following within wp-config.php

define('WP_HOME','http://test.site.com');
define('WP_SITEURL','http://test.site.com');

I’ve also had to drop the PHP version to 5.6 to be able to run the site.

Step 1 – Getting to a wp-cli capable version 3.2.1 to 3.7

So I’d like to use wp-cli, and increment the installation a bit in the 3.x branch just to see how well it goes.

Grab wp-cli version 1.3.0 at https://github.com/wp-cli/wp-cli/releases/download/v1.3.0/wp-cli-1.3.0.phar

There is no available download on wordpress.org for 3.7, at least one that isn’t listed. So if you simply grab a download link for any older version from their release page you can change the version number in the file name.

Here’s WordPress 3.7 zip installer https://wordpress.org/wordpress-3.7.zip

Upgrade WordPress Manually using these instructions https://wordpress.org/support/article/updating-wordpress/#manual-update

Since I have SSH access I’m going to do it the following way. The below commands assume public_html is your directory root where your WordPress installation sits.

wget https://wordpress.org/wordpress-3.7.zip
mv public_html to public_html.old
unzip wordress-3.7.zip -d public_html
rm -rf public_html/wp-content
cp public_html.old/wp-config.php public_html
cp public_html.old/wp-content public_html

Go to your sites /wp-admin page and update the database.

Step 2 – Upgrade 3.7 to 4.0 because why not?

So I just choose 4.0 because it seems far enough ahead but not too far.

I’m going to first test my custom wp-cli and see if I can upgrade to 3.7.31

php5.6 /usr/local/bin/wp-cli-1.3.0.phar --allow-root core update --version=3.7.31
Updating to version 3.7.31 (en_US)...
Downloading update from https://wordpress.org/wordpress-3.7.31.zip...
Unpacking the update...
Cleaning up files...
No files found that need cleaned up.
Success: WordPress updated successfully.

Success, so now let’s bump the version up to 4.0

php5.6 /usr/local/bin/wp-cli-1.3.0.phar --allow-root core update --version=4.0
Updating to version 4.0 (en_US)…
Downloading update from https://wordpress.org/wordpress-4.0.zip…
Unpacking the update…
Cleaning up files…
No files found that need cleaned up.
Success: WordPress updated successfully.

You’ll need to login to your sites /wp-admin and run the database updates if there are any.

You’ll also want to confirm that your site is still displaying properly. You might find that your theme isn’t supported by WordPress 4.0

You might also need to upgrade PHP at some point, however WordPress supports 5.6 all the way up to WordPress 5.3

Step 3 – Upgrade to 5.3! Let’s do it!

So I don’t really need to use the old wp-cli v1.3.0 and can use the latest version since we got up to WordPress 4.0

wp --allow-root core update
Updating to version 5.3 (en_US)...
Downloading update from https://downloads.wordpress.org/release/wordpress-5.3-new-bundled.zip...
Unpacking the update...
Cleaning up files...
No files found that need cleaning up.
Success: WordPress updated successfully.

Luckily for me, there were no issues!