Why am I seeing a MySQL error on my Wordpress page?


SUBMITTED BY: Guest

DATE: March 14, 2019, 10:15 p.m.

FORMAT: Text only

SIZE: 7.9 kB

HITS: 488

  1. Why am I seeing a MySQL error on my Wordpress page?
  2. You happen to check your page one day and you see an error on your Wordpress site that says the following:
  3. "Your PHP installation appears to be missing the MySQL extension which is required by WordPress"
  4. There is 1 thing to check before searching all over the internet for a solution.
  5. ++++++++++++++
  6. If You want to buy cheap web hosting then visit http://listtop.pw and select the cheapest hosting. it can be suitable for all your needs.
  7. Top 200 best traffic exchange sites http://listtop.pw/surf
  8. Listtop.pw
  9. Listtop.pw
  10. Listtop.pw
  11. +++++++++++++++
  12. 1. Contact your hosting provider and ask what the version is for the operating system of the server your account is on.
  13. Why is this the only thing you need to check? I will tell you.
  14. If the Shared Server your account is on has an operating system of 7 or higher, there is a code in your .htaccess file that is no longer needed and causes the error listed above.
  15. "How do I fix this?"
  16. One solution (and the most common solution) is to log into your file system (through cPanel, FTP, etc.) and look for a file called ".htaccess." The most common place for this file is in your public_html directory. In your .htaccess file, you want to look for this line of code:
  17. suPHP_ConfigPath /home/[USERNAME]/public_html
  18. You want to remove this code from the .htaccess file and then save it. Keep in mind there could be mutliple .htaccess files and multiple suPHP codes in those files; make sure to look for them all. Once the code is removed, the website should be showing again.
  19. "Why can I not see my .htaccess file?"
  20. Most file systems actually hide your dot files from you. There is a setting you should be able to turn on that allows you to see them.
  21. You happen to check your page one day and you see an error on your Wordpress site that says the following:
  22. "Your PHP installation appears to be missing the MySQL extension which is required by WordPress"
  23. There is 1 thing to check before searching all over the internet for a solution.
  24. 1. Contact your hosting provider and ask what the version is for the operating system of the server your account is on.
  25. Why is this the only thing you need to check? I will tell you.
  26. If the Shared Server your account is on has an operating system of 7 or higher, there is a code in your .htaccess file that is no longer needed and causes the error listed above.
  27. "How do I fix this?"
  28. One solution (and the most common solution) is to log into your file system (through cPanel, FTP, etc.) and look for a file called ".htaccess." The most common place for this file is in your public_html directory. In your .htaccess file, you want to look for this line of code:
  29. suPHP_ConfigPath /home/[USERNAME]/public_html
  30. You want to remove this code from the .htaccess file and then save it. Keep in mind there could be mutliple .htaccess files and multiple suPHP codes in those files; make sure to look for them all. Once the code is removed, the website should be showing again.
  31. "Why can I not see my .htaccess file?"
  32. Most file systems actually hide your dot files from you. There is a setting you should be able to turn on that allows you to see them.
  33. that will only work if the server provider uses suPHP on the servers
  34. __________________
  35. Terry Robertson - CEO The Easyhost Media Group
  36. PowerSSL - - We Secure your World
  37. The Scamlist Forum - Fighting against scammers
  38. The main reason for the error is incompatibility if your PHP version on the server and website configuration.
  39. You should always check the supported PHP version on your server where you are going to host the website and the configuration supported by your website.
  40. If you are using WHM/cPanel and have WHM version 60 + then in the sites cPanel under software you will have 'MultiPHP Manager' where you can change the PHP version for a particular website, so rather than change the servers PHP version to say PHP 7.0 and have clients complain some of their sites are messed up as they only work with PHP 5.6, clients can decided to change the PHP version that suits their website
  41. __________________
  42. Terry Robertson - CEO The Easyhost Media Group
  43. PowerSSL - - We Secure your World
  44. The Scamlist Forum - Fighting against scammers
  45. You happen to check your page one day and you see an error on your Wordpress site that says the following:
  46. "Your PHP installation appears to be missing the MySQL extension which is required by WordPress"
  47. There is 1 thing to check before searching all over the internet for a solution.
  48. 1. Contact your hosting provider and ask what the version is for the operating system of the server your account is on.
  49. Why is this the only thing you need to check? I will tell you.
  50. If the Shared Server your account is on has an operating system of 7 or higher, there is a code in your .htaccess file that is no longer needed and causes the error listed above.
  51. "How do I fix this?"
  52. One solution (and the most common solution) is to log into your file system (through cPanel, FTP, etc.) and look for a file called ".htaccess." The most common place for this file is in your public_html directory. In your .htaccess file, you want to look for this line of code:
  53. suPHP_ConfigPath /home/[USERNAME]/public_html
  54. You want to remove this code from the .htaccess file and then save it. Keep in mind there could be mutliple .htaccess files and multiple suPHP codes in those files; make sure to look for them all. Once the code is removed, the website should be showing again.
  55. "Why can I not see my .htaccess file?"
  56. Most file systems actually hide your dot files from you. There is a setting you should be able to turn on that allows you to see them.
  57. 1. Connect via SSH and check the PHP version
  58. To fix the problem, you should have SSH access to the server. Connect to your Linux VPS via SSH and check the PHP version which is currently in use:
  59. php -v
  60. 2. Create Info.php file
  61. You can also check the PHP version by creating a simple info.php file in your public_html directory with the following content:
  62. <?php phpinfo(); ?>
  63. Once you create the file, open your favorite web browser and access the file.
  64. 3. Update the required packages
  65. If your are running an Ubuntu VPS and PHP 7, then run the following commands:
  66. apt-get update
  67. apt-get install php7.0-mysql
  68. 4. Restart the Web Server
  69. Then restart your Apache service for the changes to take effect, or if you are using Nginx + PHP-FPM, then restart the PHP-FPM service.
  70. 5. Update PHP
  71. In case you are running PHP 5, run the following commands:
  72. apt-get update
  73. apt-get install php-mysql
  74. Restart the appropriate service for the changes to take effect.
  75. 6. Search all the available packages containing MySQL
  76. To search all the available packages containing mysql, you can use this command:
  77. apt-cache search mysql
  78. On the other hand, if you are running a CentOS VPS and you have PHP 7 installed on the server, then run the following commands to fix the problem:
  79. yum update
  80. yum install php70w-mysql
  81. 7. Restart Apache
  82. Restart Apache or the PHP-FPM service in case you are using Nginx + PHP-FPM as a web server.
  83. If you have PHP 5 installed on your CentOS server, run the following commands:
  84. yum update
  85. yum install php-mysql
  86. Restart the appropriate service for the changes to take effect.
  87. To search all the available packages containing mysql, you can use the following command:
  88. yum search mysql
  89. Once you install the MySQL extension for PHP, you can return back to your WordPress setup. If the installation went OK, the message about the missing extension should not be presented to you. You can now continue with your WordPress setup.
  90. __________________
  91. Chosen Web Host Quality Shared web hosting and Design
  92. Integrity with Excellence - Free backups through cPanel
  93. You can't develop the internet, until you learn to develop yourself

comments powered by Disqus