Title: PHP Deprecated: wpdb::escape
Last modified: October 11, 2020

---

# PHP Deprecated: wpdb::escape

 *  Resolved [Muggles](https://wordpress.org/support/users/muggles/)
 * (@muggles)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/php-deprecated-wpdbescape/)
 * Hi All
 * I’m really not sure if this is the correct place to be starting this topic, so
   if I’m in the wrong place, I apologise beforehand.
 * I’m coming up with the following errors in my debug file:
 * [11-Oct-2020 10:36:28 UTC] PHP Deprecated: wpdb::escape is **deprecated** since
   version 3.6.0! Use wpdb::prepare() or esc_sql() instead. in /chroot/home/XXXXXXXX/
   thedriveracademy.co.za/html/wp-includes/functions.php on line 4773
 * There are tons of the same error in the debug file. My functions.php file only
   goes up to line 306 as far as I can see and I have no clue why this error is 
   appearing or whether it is related to my theme (Storevilla) or a plugin. I’m 
   also not sure which page in particular it is appearing on.
 * Can anyone tell me what the problem is or even what it is actually referring 
   to?
 * How can I get rid of this error? – I’ve read that you can just deactivate the
   debug file and then you won’t see it and it doesn’t actually cause a problem,
   but I would prefer to actually try and fix the problem if at all possible.
 * Also, on a side-note, why is it referring to line 4773 when I can only see 306
   lines in my functions.php file?
 * Any help would be greatly appreciated – Thank you 😀
 * (I would still classify myself as a newbie regarding WordPress although I would
   like to think that I’m not completely useless, so please bear this in mind when
   answering this post – thank you 😀 )
 * Thanks again.
 * Regards.
    Sara
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fphp-deprecated-wpdbescape%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [Anjeela Shrestha](https://wordpress.org/support/users/anjeelastha01/)
 * (@anjeelastha01)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/php-deprecated-wpdbescape/#post-13520679)
 * Hi there,
 * Thank you for writing in,
 * Please try deactivating all plugins to see if this resolves the problem (plugin
   functions can interfere). If this works, re-activate them individually (one-by-
   one) to find the problematic plugin(s). Also, please activate the another theme
   and check if the problem persist or not.
 * Regards!
 *  Thread Starter [Muggles](https://wordpress.org/support/users/muggles/)
 * (@muggles)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/php-deprecated-wpdbescape/#post-13599920)
 * Thanks for the advice [@anjeelastha01](https://wordpress.org/support/users/anjeelastha01/)–
   I ended up scrapping the site completely and recreating it from scratch. I don’t
   seem to have much luck with trying to transfer sites, this is the 2nd time I’ve
   done it and on both occasions it has been a disaster. My mothers old saying of“
   Laziness is never any good unless it’s well followed up” is true to this day.
   I shouldn’t be lazy, I should start from scratch each time LOL. Fortunately I
   don’t create that many sites so it isn’t to much of a problem 😉
 * Anyway, thanks all. Going to mark this as resolved now. Bye 😀
 *  [Anjeela Shrestha](https://wordpress.org/support/users/anjeelastha01/)
 * (@anjeelastha01)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/php-deprecated-wpdbescape/#post-13634649)
 * Hi there,
 * Thank you for writing back,
 * Sure, if you have any queries then, please do let us know.
 * Regards!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘PHP Deprecated: wpdb::escape’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/storevilla/1.4.2/screenshot.png)
 * StoreVilla
 * [Support Threads](https://wordpress.org/support/theme/storevilla/)
 * [Active Topics](https://wordpress.org/support/theme/storevilla/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/storevilla/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/storevilla/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Anjeela Shrestha](https://wordpress.org/support/users/anjeelastha01/)
 * Last activity: [5 years, 6 months ago](https://wordpress.org/support/topic/php-deprecated-wpdbescape/#post-13634649)
 * Status: resolved