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: and

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

Submit an answer
Answer a question...

This textbox defaults to using Markdown to format your answer.

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

Sign In or Sign Up to Answer

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.

Site Moderator
Site Moderator badge
March 15, 2022

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 :

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:

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!