Nk nk nk
Nk nk nk

Reputation: 23

After upgrade to PHP 7.0, my website does not start up

I was using PHP 4.0 and recently upgraded to PHP 7.0 with cPanel. But now my website is down, it shows the following error: Your PHP installation appears to be missing the MySQL extension which is required by WordPress.

Does this mean that I will have to completely reinstall & reconfigure all websites, or is there an easy solution within cPanel?

-- snip --

Upvotes: 0

Views: 1941

Answers (1)

delboy1978uk
delboy1978uk

Reputation: 12375

PHP 4? Wow :-P

All the mysql_whatever() commands have been deprecated a while back , and completely removed in v7 (see http://php.net/manual/en/migration70.removed-exts-sapis.php).

You should now update your code to use the PDO API.

http://php.net/manual/en/class.pdo.php

See this guide for steps involved.

https://www.sitepoint.com/migrate-from-the-mysql-extension-to-pdo/

You may have other things needing fixed too. Always check the changelogs, and look at these migration guides, which lists everything you need to know about the upgrade.

http://php.net/manual/en/migration5.php

http://php.net/manual/en/migration70.php

Your wordpress should be able to update itself by clicking something in the admin section. I can't remember specifically, but here's a link that can help. You just need to worry about the code you wrote yourself.

https://codex.wordpress.org/Updating_WordPress

Upvotes: 3

Related Questions