Question

How do I update php to the latest version in my droplet? (Ubuntu LAMP on 14.04)

I’m just running wordpress there (and Webmin). This was setup by friends more than half a decade ago…

I tried following: https://www.digitalocean.com/community/questions/unable-to-locate-package-php7-2-ubuntu-20-04 and https://www.digitalocean.com/community/questions/not-able-to-install-php-5-6-on-ubuntu-10-04

I keep getting an “Couldn’t find any package by regex” message…

Subscribe
Share

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hi @JegaAnish Dev,

Your OS is really old and as such open to vulnerabilities. I’ll recommend upgrading to 20.04 as soon as possible. This will prove to be easier for the WordPress website to be upgraded as well.

There are two ways to go about this, either upgrade your Droplet from 14.04 to 20.04 OR create a new 20.04 Droplet and migrate your WordPress over to it.

Since the changes between 14.04 and 20.04 are far too big, there most probably would be issues along the way. In that regard, I’ll recommend going for the option - creating a new droplet and migrating your website over to it.

The first step is to create and configure your Droplet to be ready for your website. This process can be difficult for people with no experience. As such I’ll recommend using the DigitalOcean market place :

https://marketplace.digitalocean.com/apps/wordpress

There is a WordPress image. This will create a Droplet ready for use exactly for a WordPress website. Follow the steps there and you’ll be good to go.

Now that you have a second upgraded Droplet, it’s time to migrate the data, you can use plugins like:

https://wordpress.org/plugins/all-in-one-wp-migration/

It should move your data all in one go. The final step will be to test everything with a host file and make sure it is working fine and then switch the DNS settings and push your site live from DigitalOcean.

Hope that this helps!