1. Take a backup snapshot on your digitalocean server.
2. Back up your Websites:
Make a backup of your wordpress websites before updating PHP version. Take note that is little risk during the process, making a backup is still recommended.
3. Sign-in to your Ubuntu server using SSH
4. Check your current PHP version
php -v
5. Add a PPA for PHP 7.3 Packages
Add the ondrej/php which has PHP 7.3 package and other required PHP extensions.
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
You can check your PHP version again to make sure the PHP has been updated on your server. php -v
Then, proceed to install related modules.
sudo apt install php7.3-fpm php7.3-common php7.3-mbstring php7.3-xmlrpc php7.3-gd php7.3-xml php7.3-mysql php7.3-cli php7.3-zip php7.3-curl
6. Disable PHP5 and enable PHP7
sudo a2dismod php5
sudo a2enmod php7.3
sudo service apache2 restart
Congratulations! Your WordPress websites should be running on the newest PHP version now and you won’t see the warning again in the Dashboard. The PHP update is really important and I highly recommend you to do it immediately if you haven’t done so. It does not only make your site faster for search engines and for your visitors, but also make your website better protected against hackers.
Top comments (0)