Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed inthe future: use mysqli or PDO instead in wp-includes/wp-db.php on line 1518.

This extension was deprecated in PHP 5.5.0, and it was removed in PHP 7.0.0. Instead
The issue with mysql connection can be caused due to different cause, solving this can be a little tricky, in my case the problem was the php version, if you will use php 5.4 ( end of life ) i think you will not see any of this error, because in php5.4 the mysql_connect is a updated function.

Anyway here there are some steps how to solve this issue:

  • De active all the plugins by renaming the plugins folder to a new one plugins.new or something differnet,, if you have ftp connection.
  • If the first solution do not work, try renaming the activated theme, so WordPress will choose the default one.
  • If also the theme does not work try to reset the .htaccess to the default one.As i mentioned before please check the php version, if you use php 5.4 you will not have any problem.
    If any of this solved your issue let me know, maybe i should add a new point to the solution section 🙂

 

Leave a Reply

Your email address will not be published.