I tried backing up and restoring my WP site to a different location. Inside the backup SQL file the posts contain HTML with carriage returns escaped:


However after the restore, these now appear inside the posts as literal strings, so the output to the page is now...

Some text \r\n some more text

Did I chose the wrong restore option or is there a WP setting I missed somewhere? Note. The Db is MariaDb. Everything else seems to have restored perfectly.

  • 1
    Hi johnny, do you still have access to the original database? Check to see if these strings exist in the original tables too, and try other SQL compatibilies / encodings. – Jack Johansson Feb 14 '17 at 11:36
  • 1
    Just trying the wp_posts table I'm trying XML format but every time I import, I get Duplicate Primary key even after dropping the table in the destination Db. Will try the full Db next. – JohnnyBizzle Feb 14 '17 at 14:22
  • During the import... SET FOREIGN_KEY_CHECKS = ON; PhpMyAdmin is complaining it does not recognise keyword near ON. Weird. Import fails. – JohnnyBizzle Feb 14 '17 at 14:48

Your Answer

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

Browse other questions tagged or ask your own question.