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 が原因です。
解決方法
- cPanel の File Manager で .htaccess ファイルを探します
- ファイルのバックアップを作成します
- ファイルを編集し、次のように見える廃止された 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.