Start Debugging
2020-11-06 更新日 2023-11-05 wordpress Edit on GitHub

HostGator で MultiPHP をアップグレードした後の WordPress 'Missing MySQL extension' を解消する方法

HostGator の MultiPHP manager で PHP をアップグレードした後の WordPress エラー 'Missing MySQL extension' を、.htaccess から廃止された handler を取り除いて解消します。

WordPress サイトの PHP バージョンを MultiPHP manager で PHP 7 にアップグレードした後、次のエラーに遭遇することがあります。

Your PHP installation appears to be missing the MySQL extension which is required by WordPress.

これは .htaccess ファイル内の廃止された handler が原因です。

解決方法

  1. cPanel の File Manager で .htaccess ファイルを探します
  2. ファイルのバックアップを作成します
  3. ファイルを編集し、次のように見える廃止された handler を削除します。
# Use PHP71 as default
AddHandler application/x-httpd-php71 .php
<IfModule mod_suphp.c>
    suPHP_ConfigPath /opt/php71/lib
</IfModule>

または

#Use PHPedge as default
AddHandler application/x-httpd-php-edge .php
<IfModule mod_suphp.c>
    suPHP_ConfigPath /opt/phpedge/lib
</IfModule>

ファイルを保存すれば、エラーは解消されるはずです。

Comments

Sign in with GitHub to comment. Reactions and replies thread back to the comments repo.

< 戻る