Right now, Ubuntu has been released with tons of new features. Upgrading your Server from Ubuntu old to Ubuntu new is a good idea but it requires some precautions when you are moving forward to upgrade your server. Upgrading your servers are so easy with given step by step method. You can easily upgrade your WordPress server hosted with LAMP or LEMP stack with this tutorial. It will upgrade all packages and kernel to latest version so that you can use its latest features and advanced security modules. This tutorial explain you how to smoothly upgrade your WordPress server from Ubuntu old to Ubuntu new so easily.
Step-1 : Create a backup or Snapshot of your WordPress Server
Note: As a precaution, first of all create a backup or snapshots before proceeding to upgrade and If anything goes wrong then backup or snapshots will help you to restore your WordPress website in a last working state.
Connect your WordPress sever using SSH and create a backup. You can also use your VPS hosting backup solutions like snapshots. This feature will help you to manually create a backup using snapshots.
Step-2 : Upgrade from Ubuntu 16.04 to Ubuntu 18.04 using its upgrade scripts
Now, Update package repository to latest:
$ sudo apt-get update
Next, Upgrade packages:
$ sudo apt-get upgrade
You will remove unwanted packages and upgrade Ubuntu 16.04 LTS to the latest version:
$ sudo apt-get dist-upgrade
Finally run the upgrade scripts:
$ sudo do-release-upgrade
Follow all the instructions during the running of upgrade scripts.
Step-3 : After upgrade finally your WordPress shows you 404 error.
Now find and replace it with correct version of PHP from
Edit Apache virtual host:
$ sudo nano /etc/apache2/sites-available/example.com.conf $ sudo nano /etc/apache2/sites-enabled/example.com.conf
Edit Apache configuration file:
$ sudo nano /etc/apache2/apache2.conf
Restart the Apache services to make changes in effect:
$ sudo systemctl restart apache2
Edit Nginx server blocks:
$ sudo nano /etc/nginx/sites-available/example.com $ sudo nano /etc/nginx/sites-enabled/example.com
Edit Nginx configuration file:
$ sudo nano /etc/nginx/nginx.conf
Restart the Nginx services to make changes in effect.:
$ sudo systemctl restart nginx
If this still shows you error then look carefully which packages has been upgraded. This given table will help you to find out issues.
Step-4: Each Package version comparison table from Ubuntu 16.04 to Ubuntu 18.04
This table can help you to make changes to your configuration files for resolving issues.
|Ubuntu Old||Ubuntu New|
That’s all for now.