Click here to Skip to main content
15,868,016 members
Please Sign up or sign in to vote.
1.44/5 (2 votes)
See more:
Fatal error: Uncaught Error: Call to undefined function get_magic_quotes_gpc() in /home/worldwise/www/wordpress/wp-includes/load.php:585 Stack trace: #0 /home/worldwise/www/wordpress/wp-settings.php(243): wp_magic_quotes() #1 /home/worldwise/www/wordpress/wp-config.php(82): require_once('/home/worldwise...') #2 /home/worldwise/www/wordpress/wp-load.php(37): require_once('/home/worldwise...') #3 /home/worldwise/www/wordpress/wp-blog-header.php(12): require_once('/home/worldwise...') #4 /home/worldwise/www/wordpress/index.php(17): require('/home/worldwise...') #5 {main} thrown in /home/worldwise/www/wordpress/wp-includes/load.php on line 585


What I have tried:

i INSTAlled the WordPress and import the Database but when i run it on locall server it shows me this error
Posted
Updated 15-Jan-23 5:25am

It would depend on the version of PHP you're using, I believe the get_magic_quotes_gpc function was removed in PHP 8.0. I'd suggest you're either using an older version of Wordpress which had the dependency on that function, in which case you need to upgrade, or you'll need to downgrade your PHP version to < 8 in order for the function to become available.

Worth noting that the documentation page[^] explicitly states that it's deprecated, so using it should be avoided where possible.
 
Share this answer
 
Comments
Chris Copeland 4-Aug-21 8:18am    
Also worth noting that this Wordpress page explains that the function should have been fixed.
Jjopkjj 4-Aug-21 8:37am    
i am using PHP 8.0.2
Chris Copeland 4-Aug-21 10:55am    
That explains it then, that version of PHP does not have the "get_magic_quotes_gpc" method, so you need to upgrade the version of Wordpress that's running to one that doesn't use that method. The alternative is to downgrade your PHP version back to 7.
Jjopkjj 5-Aug-21 1:29am    
Thanks i will do
I hvae experienced similar issue with a third party plugin.

After a few hours of reviewing the server logs, I came to the conclusion that it was a software conflict with the latest verion of PHP, which I believe was launched late in 2020. The solution for me was to downgrade the PHP on a Godaddy Server.

Hope this helps in some way.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900