WordPress 7.2 will turn off a database setting that some hosts enable. The setting is called NO_BACKSLASH_ESCAPES. It can cause hard-to-trace database errors. Most sites will not notice the change.
Why WordPress is doing this
WordPress uses the backslash character to mark special characters in database queries. With NO_BACKSLASH_ESCAPES on, MySQL treats the backslash as an ordinary character. Queries can then fail or return the wrong data.
Some hosts and server setups turn this mode on. Until now, sites on those servers could hit problems that were hard to find. WordPress already switches off other unsupported modes, such as STRICT_ALL_TABLES, TRADITIONAL, and ANSI. This mode joins that list, according to the WordPress core team’s announcement.
What changes
When WordPress connects to the database, it removes this mode from that connection only. Your server’s global settings stay the same. Other apps on the same server are not affected.
What to do
Most site owners need to do nothing. If you have odd database errors on a host that uses this mode, the change may fix them.
If your site truly depends on the mode, you can keep it with a filter. Because WordPress connects to the database before plugins load, the code must go in a db.php drop-in file. A normal plugin or must-use plugin runs too late. Ask a developer or your host to set this up. WordPress notes that core may not work correctly with the mode turned on.
End of article