Upgrading My Old Version of WordPress Site
This blog was first built in 2015 using WordPress Version 4.3.1 and hosted on a basic Ubuntu 14.04 LTS VPS at Atlantic.Net. The server specification was the lowest available at the time: 1 vCPU, 256MB RAM, and a 10GB SSD for just $1.00 USD per month.
Over time, I upgraded WordPress to Version 4.9.20, but the underlying OS stayed on Ubuntu 14.04—even when it reached its official End-of-Life (EOL) in April 2019. Simply because “if it ain’t broke, don’t fix it,” I didn’t feel an urgent need to upgrade. Upgrading an entire operating system naturally takes more effort than clicking a convenient WordPress “One-click Update.” (Note: Ubuntu 14.04’s Extended Security Maintenance was later pushed to April 2024, giving it an extra 5 years of life).
Why It Was Time to Upgrade
The turning point came when I received security notifications regarding our legacy PHP version. To ensure security and compliance, WordPress now requires a minimum of PHP 7.4. Due to complex package dependencies, it is significantly easier to spin up Ubuntu 20.04 (which natively bundles PHP 7.4) than it is to manually compile and force PHP 7.4 onto an outdated Ubuntu 14.04 system.
The Strategy: In-Place Upgrades vs. Server Cloning
I researched various ways to migrate and upgrade a legacy WordPress site to a new server. I ruled out upgrading the live production server directly due to its low hardware specifications and the absolute need for a fallback option if something went wrong.
The most common approach is installing a fresh copy of the latest WordPress on a new Ubuntu 20.04 server, then migrating the /wp-content/ directory and database. This works perfectly if your site is vanilla. However, if your site relies on custom tools, configurations, or localized scripts, it quickly gets complicated.
Instead, I found it much cleaner to clone the existing server using a snapshot backup tool provided by my cloud host. By using a cloned environment, I could sequentially upgrade Ubuntu, WordPress, and my custom tools together without reinstalling everything from scratch.
Note: Moving to a clone also allowed me to scale up my hardware allocations. Atlantic.Net no longer offers the classic $1.00/month plan, so migrating to a larger instance tier gave me the headroom required to run the OS upgrade scripts smoothly.
Step-by-Step Upgrade Guide
For reference, you cannot upgrade directly from Ubuntu 14.04 to 20.04. You must upgrade sequentially from one LTS (Long-Term Support) version to the next. Here is the exact order of operations I used to successfully modernize this site.
Step 1: Clone and Prepare the Infrastructure
- Create a snapshot backup of your existing live Ubuntu 14.04 server.
- Spin up a new cloned server instance using that snapshot.
- Update your DNS settings to point to the new server’s IP address. Once traffic shifts, you can safely power down the old server and keep it as an offline fallback.
My new instance specifications stepped up to: 1 vCPU, 1GB RAM, and a 25GB SSD.
Step 2: Resize Filesystem and Swap Space
Because the snapshot mirrors the original small file architecture, you need to expand your filesystem partition manually to utilize the larger SSD storage:
sudo resize2fs /dev/sda1
Remember to also adjust and enlarge your /swapfile allocation to match your newly increased RAM capacity.
Step 3: Upgrade from Ubuntu 14.04 to 16.04 LTS
Run the initial package updates and trigger the core distribution upgrade:
sudo apt update && sudo apt upgrade
sudo apt install update-manager-core
sudo do-release-upgrade
sudo reboot
Once the server restarts, clean up old packages:
sudo apt update && sudo apt upgrade
sudo apt autoremove
Step 4: Reconfigure WordPress File Permissions
Legacy versions of WordPress handled background file operations differently. Older setups relied heavily on FTP configurations, requiring strict FTP parameters and login credentials stored inside wp-config.php. Modern WordPress installations simply handle updates directly through the filesystem.
To fix this, add the following line to your wp-config.php file:
define('FS_METHOD','direct');
Next, correct your folder permissions. While old installations discouraged making Apache the owner of core files, modern installations require it for seamless updates:
sudo chown -R www-data:www-data /var/www/html/
With permissions corrected, log into your dashboard and run the WordPress One-click Update to jump up to the next stable intermediate version.
Step 5: Upgrade from Ubuntu 16.04 to 18.04 LTS
With the intermediate WordPress updates stable, move to the next OS version:
sudo apt update && sudo apt upgrade
sudo do-release-upgrade
sudo reboot
Post-reboot cleanup:
sudo apt update && sudo apt upgrade
sudo apt autoremove
Step 6: Final Upgrade from Ubuntu 18.04 to 20.04 LTS
Run the final leg of the OS migration:
sudo apt update && sudo apt upgrade
sudo do-release-upgrade
sudo reboot
Perform a full package and distribution upgrade sweep:
sudo apt update && sudo apt upgrade
sudo apt dist-upgrade
sudo apt autoremove
Step 7: Finalize the WordPress Update
Now that your OS is securely resting on Ubuntu 20.04 with modern PHP packages active, return to your WordPress dashboard one last time. Run the internal One-click Update tool again to grab the newest available version core.
Conclusion
Following this sequential method, my legacy site successfully crossed a multi-year technology gap without breaking its custom configurations. The blog is now running smoothly on a modern, fast, and secure architecture.
It shocks me that this blog is still updating!