Is it custom developed theme or have you purchased/downloaded from somewhere, because its better to ask with theme author about this issue.
I get the same error when I change back to the standard theme and from what I can gather of information it’s something with the connection to the database that’s causing this error
Fatal error: Uncaught Error: Call to undefined function mysql_escape_string() in /var/www/tux-tutorials.com/public_html/wp-content/themes/twentysixteen/functions.php:60 Stack trace: #0 /var/www/tux-tutorials.com/public_html/wp-settings.php(387): include() #1 /var/www/tux-tutorials.com/public_html/wp-config.php(89): require_once('/var/www/tux-tu...') #2 /var/www/tux-tutorials.com/public_html/wp-load.php(39): require_once('/var/www/tux-tu...') #3 /var/www/tux-tutorials.com/public_html/wp-blog-header.php(13): require_once('/var/www/tux-tu...') #4 /var/www/tux-tutorials.com/public_html/index.php(17): require('/var/www/tux-tu...') #5 {main} thrown in /var/www/tux-tutorials.com/public_html/wp-content/themes/twentysixteen/functions.php on line 60
Have you checked if there is any plugin causing this issue, just give it a try by deactivating them one at a time for troubleshoot.
mysql_escape_string() (and all mysql-* functions) was removed in PHP 7. Everyone should be using the mysqli-* variants, so change it (and all other instances) to mysqli_escape_string(). As this appears to be a hacked twentysixteen theme, you’re not really changing core files in doing so. The real twentysixteen’s functions.php makes no mysql or mysqli calls at all. Line 60 is a comment in the real twentysixteen.
I suggest renaming this version to suppress any update notices. If the theme is updated, all the hacks in place will be lost. For future reference, you are better off creating a child theme instead of directly hacking a theme.
To rename, first temporarily switch to another theme. Then change the name of the folder and in the header comment in style.css. Switch back to the newly named theme.
I had the same problem in a multisite whereby after installing a new site, I activated some plugins and everything went blank white screen.
OOH! All my sites, 6 of them were gone.
I tried all recommendations here on the forum but none worked.
What I did on the second day was to replace the main site theme FUNCTIONS.PHP with the original I had in the download folder. Luckily it worked.
I did the same for all other sites and it all worked.
So DON’T PANIC, JUST REPLACE THE FUNCTIONS.PHP FILE IN THE THEMES WITH ORIGINAL CORRESPONDING THEME FILE.
THAT’S ALL YOU ARE DONE.
Come back and thank me.
-
This reply was modified 9 years, 3 months ago by
mukundi.