I just upgraded php 5.5.9 to php7

Posted December 4, 2016 3k views

I just upgraded php 5.5.9 to php7 with the instruction from Brennen Bearnes


After installation I check with php -v and shows that php 7 is installed but wordpress is still using ver 5.5.9. can someone please direct me to which configuration file needs.

My guess php5.5.9 need to be purged but need guidance

looks like php7 was installed in etc/php/7.0 instead of etc/php7.0

Thanks Ralph

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.

Submit an Answer
1 answer

Ýou will have to purge your current PHP5 if you don’t want to use it anymore. You can do this with the following command:

sudo apt-get purge php5-fpm php5-mysql php5-common

sudo apt-get --purge autoremove

Hope this will help you enough.

  • Thank you CrypticDesigns

    I will try it and update if it worked.

    • Great! If you have any other questions dont hesistate to ask them.

      • I had the same issue as OP and tried those commands. The first command asked me if I wanted to also delete the database to which I replied no. It seems WordPress is still using php 5.5.9. Is it because I chose no when it asked me if I wanted to delete the database? If so, what can I do to solve this?

      • Never mind my previous message. I restored an old backup and went through those commands again, this time selecting yes to the database question. Unfortunately, WordPress is still showing that I’m using PHP 5.5.9. Any help would be appreciated.