Home > Database > Mysql Tutorial > body text

How to Fix the \'Missing MySQL Extension\' Error in WordPress?

Barbara Streisand
Release: 2024-11-04 03:27:01
Original
666 people have browsed it

How to Fix the

Fixing the "Missing MySQL Extension" Error for WordPress with PHP

WordPress installation requires the MySQL extension for PHP to function correctly. If you encounter the error message "Your PHP installation appears to be missing the MySQL extension," you can follow these steps to resolve it:

  1. Verify MySQL Server Status:

    Run the command /etc/init.d/mysql status to check if the MySQL server is running. If it's not, start it using /etc/init.d/mysql start. If MySQL is not installed, use apt-get install mysql-server to install it.

  2. Check for PHP MySQL Module:

    Run dpkg --list | grep php5-mysql to verify if the PHP MySQL module (php5-mysql) is installed. If it's not, install it with apt-get install php5-mysql.

  3. Enable PHP MySQL Extension:

    Edit the php.ini file (ffp/etc/php.ini) and uncomment the following extensions:

    • extension=php_mysql.dll
    • extension=php_mysqli.dll
  4. Restart Web Server:

    Run /etc/init.d/apache2 restart to restart the web server and apply the changes.

  5. Additional Tip:

    If you encounter issues with shortcuts being deleted after MySQL restarts, consider creating a symlink in your root directory to ffp/opt/mysql. Use the command sudo ln -s ffp/opt/mysql /root.

By following these steps, you should resolve the missing MySQL extension issue and get WordPress running smoothly.

The above is the detailed content of How to Fix the \'Missing MySQL Extension\' Error in WordPress?. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template