• Erik

    (@southernutahautism)


    I am using the Standard Theme 2.0 for a series of sites, and I am trying to set up a dev server. So I clone the file system, and copy the database over, and do a search/replace for my live domain and change it to the dev domain.

    Everything goes off fine, except for one thing – the theme settings for the Standard Theme 2.0 are all reset to defaults. It’s a row in the wp_options table where the Standard Theme 2.0 saves its custom theme settings. Simple stuff like the location of the logo file, whether to use css3, whether to use custom menu’s, just basic stuff. But for some reason, if the database is moved, even though the settings are still in the database entry, the wp-admin theme settings page shows everything as blank defaults.

    So I checked the database, and the settings are all stored in the row where they are supposed to be, and all the settings appear correct, the theme just doesn’t recognize them.

    So I took the working copy of the database, and then another copy that I manually reconfigured, and noticed there’s just 1 different in the theme settings cell in the database. At the beginning of the theme settings, there’s some sort of hash, and it’s different between the 2 databases. The rest of the database entry is the same, all the file paths and settings are set, but the theme just doesn’t use them.

    So here’s what it is on the version where my Theme settings aren’t maintained during the clone process:

    a:76:{s:8:"_wpnonce";s
    :10:"1d8a5372c8";s

    And here’s what it is when I manually reset my theme settings to match what I need:

    a:76:{s:8:"_wpnonce";s
    :10:"095d66b0b4";s

    So even though the entire entry for the Standard Theme settings is the same, it appears that I can’t just move the database from one server to another, since this little bit of data seems to be different for whatever server the WP is installed on. Even though all the settings are the same, it sets that little hash code to something different, and I don’t know if that is because it is on a new server or domain or what.

    None of the other themes I’ve done this with have had this problem, so I’m wondering why/how the Standard Theme 2.0 is using this code to determine the server, and why it would need this to maintain the settings even though the rest of the entry does have all the correct values.

    I don’t know what _wpnonce is, but is it preventing me from being able to have these Theme settings stay persistent through a database move. And this is somewhat of a pain since I’m trying to develop a system that uses SVN for file system development, and then a way to maintain the databases.

    Is it possible that the Standard Theme is using the _wpnonce function to determine where it is installed, and since the entry doesn’t match, it has to all be reset each time?

  • The topic ‘Theme stores some server specific data that doesn't work on an sql dump/import’ is closed to new replies.