How to Fix Error After MultiPHP Update?
If you previously used the PHP Selector plugin to manage the PHP version for your site and recently used the new MultiPHP Manager plugin to update PHP, you may have this error when visiting your website.
Warning: Use of undefined constant WP_CONTENT_DIR – assumed ‘WP_CONTENT_DIR’ (this will throw an Error in a future version of PHP) in /home/cheapglasses123/public_html/wp/wp-includes/load.php on line 141 Your PHP installation appears to be missing the MySQL extension which is required by WordPress.
Login to cPanel.
Select File Manager.
Open the public_html folder.
# 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>
The one you want to keep will look like the one below.
# php — BEGIN cPanel-generated handler, do not edit
# Set the “ea-php73” package as the default “PHP” programming language.
<IfModule mime_module>
AddHandler application/x-httpd-ea-php73 .php .php7 .phtml
</IfModule>
# php — END cPanel-generated handler, do not edit
That means, just delete:
# Use PHP71 as default
AddHandler application/x-httpd-php71 .php
<IfModule mod_suphp.c>
suPHP_ConfigPath /opt/php71/lib
</IfModule>
or:
#Use PHPedge as default
AddHandler application/x-httpd-php-edge .php
<IfModule mod_suphp.c>
suPHP_ConfigPath /opt/phpedge/lib
</IfModule>
and only keep:
# php — BEGIN cPanel-generated handler, do not edit
# Set the “ea-php73” package as the default “PHP” programming language.
<IfModule mime_module>
AddHandler application/x-httpd-ea-php73 .php .php7 .phtml
</IfModule>