I have a staging site and production site for my WordPress install. A few weeks ago, we started a minor redesign so we copied the production database down to staging to sync it up and then we got to work. Meanwhile, we were still posting to the production site.

When we were finished with the redesign, I exported all the content from production, and imported it into staging using the regular WordPress Import. Now staging should have all the new content and all the new designs. The final step would be to mysqldump from stage and restore in production.

During the import process, about 10-20% of my older blog posts (ones that had existed in STG and PRD) were duplicated. Two entries in the archives pages. Two distinct URIs (i.e. /my-awesome-post and /my-awesome-post-2). How did this happen? What is the criteria that the importer uses to detect duplicates? How can I avoid the duplication in the future? Am I using the import/export correctly?

  • I'm curious as to why you would even need to "restore" the DB in production after a redesign? Why would your data change? – vancoder Oct 13 '15 at 16:30
  • There are numerous database changes associated with the redesign- theme options, content updates, new plugins+config, etc. I figured it would be easier to recreate posts in staging and restore the full DB rather than manually recreating all of the redesign changes in production. – Jeff Oct 13 '15 at 19:28

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.