I have some problems matching this message in my WordPress network update page:

You have the latest version of WordPress. Future security updates will be applied automatically. If you need to re-install version 4.9.4, you can do so here:

With the one I just noticed after temporarily enabling debug mode:

Notice: wpdb::escape is deprecated since version 3.6.0! Use wpdb::prepare() or esc_sql() instead. in /home/user/public_html/blog.network/wp-includes/functions.php on line 3846

Notice: get_current_site_name is deprecated since version 3.9.0! Use get_current_site() instead. in /home/user/public_html/blog.network/wp-includes/functions.php on line 3846

What am I missing? How can core WordPress code still use code that its very own developers marked as deprecated? How can I update functions.php file in wp-includes to not use deprecated code and methods?

  • One of your plugins or your theme is causing this, not WordPress.
    – swissspidy
    Mar 13, 2018 at 21:52
  • 1
    For a longer explanation, read Pat J‘s answer
    – swissspidy
    Mar 15, 2018 at 8:39

1 Answer 1


Line 3846 in wp-includes/functions.php is in a function named _deprecated_function(), which warns about the use of deprecated functions. I did a quick search of my copy of 4.9.4 core and didn't find any instances of wpdb->escape() or get_current_site_name(), the two functions you're actually being warned about.

Most likely, the deprecated functions are in a plugin or a theme. If you disable all plugins and switch to a default theme (such as Twenty Seventeen), the Notices should go away.

  • You are -- of course -- correct. The sad thing here is that faulty plugin is "WordPress MU Domain Mapping". It is no longer updated, because it is no longer needed. However, I must keep using it, because cited counter-solution requires: (a) a clean install and (b) a dedicated IP address. Both things not possible in my case.
    – trejder
    Mar 15, 2018 at 22:14
  • 1
    I'd say you've got two paths to choose from: a) fork the plugin and replace the deprecated function calls with the recommended replacements, or b) make the conscious choice to ignore the Notices thrown by the plugin.
    – Pat J
    Mar 18, 2018 at 18:19
  • Can I (at all or how?) mute notices thrown by only this single plugin? Or is it either all notices (muted) or none?
    – trejder
    Mar 19, 2018 at 8:23
  • 1
    It doesn't look like it. I had hopes for the deprecated_function_trigger_error filter, but it appears to globally turn deprecation notices on or off, instead of allowing you to pick and choose the notices to suppress.
    – Pat J
    Mar 19, 2018 at 13:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.