Question

Wordpress Fatal Error

I am getting this error ////////////// Fatal error: Uncaught Error: Call to undefined function mysql_escape_string() in /var/www/html/wp-content/themes/twentysixteen/functions.php:60 Stack trace: #0 /var/www/html/wp-settings.php(387): include() #1 /var/www/html/wp-config.php(93): require_once(‘/var/www/html/w…’) #2 /var/www/html/wp-load.php(39): require_once(‘/var/www/html/w…’) #3 /var/www/html/wp-blog-header.php(13): require_once(‘/var/www/html/w…’) #4 /var/www/html/index.php(17): require(‘/var/www/html/w…’) #5 {main} thrown in /var/www/html/wp-content/themes/twentysixteen/functions.php on line 60 /////////////


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

mysql_* commands have been removed in PHP7 and have been depreciated (not recommended for use) since PHP 4.3.0 (Released: 27 December 2002). I am guessing that someone edited this from the default twentysixteen/functions.php file since it does not include a mysql_escape_string() command.

mysqli_real_escape_string() provides a drop in replacement under the mysqli module (installed in package php7.0-mysql) that should help you resolve this. I would also recommend looking for any other mysql_ type calls in your theme to ensure they are updated or removed.

I have installed social locker plugin & active. Then I found above error.

You can check here itube.co.in

I am using latest theme update.