When you upgrade your PHP version (Usually from PHP 5.2 to 5.3), you might see several “PHP Deprecated” error on the top of your page. Error seen are similar to
PHP Deprecated: Assigning the return value of new by reference is deprecated in C:\Inetpub\wwwroot\wordpress\wp-settings.php on line 512
PHP Deprecated: Assigning the return value of new by reference is deprecated in C:\Inetpub\wwwroot\wordpress\wp-settings.php on line 527
PHP Deprecated: Assigning the return value of new by reference is deprecated in C:\Inetpub\wwwroot\wordpress\wp-settings.php on line 534
PHP Deprecated: Assigning the return value of new by reference is deprecated in C:\Inetpub\wwwroot\wordpress\wp-settings.php on line 570
PHP Deprecated: Assigning the return value of new by reference is deprecated in C:\Inetpub\wwwroot\wordpress\wp-includes\cache.php on line 103
One easy way to fix this is updating your wp-config.php file
- Go to your wordpess installation file
- Open the wp-config.php file
- enter “error_reporting(0);" right after the "<?php" line
- save the file and voila, the warnings are gone from the website
For Godaddy hosting users
If you are seeing this error on your GoDaddy hosting account, here is how to fix this
- Log in to your Account Manager.
- From the My Products section, click Web Hosting.
- Next to the hosting account you want to use, click Launch.
- From the Content menu, select FTP* File manager
- Click on the folder your wordpress is installed in
- Select the checkbox right by the wp-settings folder
and click edit button on the top - In the edit window, enter “error_reporting(0);" right ater the "<?php" line
- Click save button and browse to your web page to see the warnings magically gone.
Hope this helps,
- No comments
- Tags: Godaddy, hosting, Php, Wordpress
