WordPress.org

Forums

WordPress Theme customization wiped after search/replace (3 posts)

  1. scoundr3l
    Member
    Posted 1 year ago #

    Hello,

    I've been moving a few WordPress sites lately and I keep running into a minor issue, hopefully someone can lend some insight.

    If I'm changing the path or domain, I create a dump file of the database, then open the file in Notepad++, run a search and replace for all instances of the old domain/path and replace it with the new. Then I import the dump file and re-save the permalinks. All the links and images display properly under the new path, but often the theme customization gets wiped out (i.e. the header image defaults, the navigation resets, etc)

    I thought I was doing things by the book, but I must be missing something. Any ideas why these settings don't import properly?

    Thanks

  2. vtxyzzy
    Member
    Posted 1 year ago #

    When you move a site, you must replace the old URLs and paths with the new ones. Some of these are stored in the database in 'serialized' form where the string length is stored along with the string. You must use special tools to search and replace the old values with the new ones.

    If you replace an old URL with a new one of a different length, it will break the serialization, causing many different problems.

    If the old site is still available, you can use the steps shown in this article to copy the site: http://wordpress.mcdspot.com/2012/08/22/migrating-a-wordpress-site-step-by-step/

    If the old site is not available, and you still have a copy of the database from that site, you should be able to use this tool to make the changes: http://interconnectit.com/products/search-and-replace-for-wordpress-databases/

  3. scoundr3l
    Member
    Posted 1 year ago #

    Awesome info, thanks a lot!

Topic Closed

This topic has been closed to new replies.

About this Topic