Following queries will be answered by this post,
How to fix broken WordPress site after updating PHP
My site stopped working after upgrading php to php 7.4
WordPress site showing error after upgrading php to php 7.4
After upgrading to PHP 7.4 site started showing below warning message,
Warning: Use of undefined constant WP_CONTENT_DIR – assumed ‘WP_CONTENT_DIR’ (this will throw an Error in a future version of PHP) in /home2/…/public_html/wp-includes/load.php on line 115
Your PHP installation appears to be missing the MySQL extension which is required by WordPress.
Deprecated: Directive ‘allow_url_include’ is deprecated in Unknown on line 0
The Simple solution is to remove or rename the .htaccess file.
FTP the site and find .htaccess file above the public_html folder. In case you do not want to remove .htaccess just rename to .htaccess-old.
The upgrade from MultiPHP Manager of cPanel generates the 7.4 PHP handler under public_html folder, while old PHP version handler already exists in the folder above public_html, which conflicts and causes the issue.
For further troubleshooting you can examine the .htaccess file and check if it has the updated information about php 7.4.
Following is the information which cPanel writes to update the php handler,
# php -- BEGIN cPanel-generated handler, do not edit
# Set the “ea-php74” package as the default “PHP” programming language.
<IfModule mime_module>
AddHandler application/x-httpd-ea-php74 .php .php7 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit
Note that WP Engine has decided to deprecate the .htaccess file for all customers on future versions of PHP. The latest PHP version, PHP 7.4, and any subsequent versions will no longer support .htaccess.
Ref: https://wpengine.com/support/htaccess-deprecation/
If you are using any directives other then the default WordPress directives, you will face the issue. You should have to remove those directives and use the alternatives. Visit the above WP Engine site link to view the alternatives.
No Comment Received
Leave A Reply