Web Hosting
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

WordPress fix WP_Option theme_mods_XX being overwritten

Discussion in 'Misc WordPress Requests' started by pacificnewmedia, Dec 5, 2017.

  1. pacificnewmedia

    Guest

    WP_Option theme_mods_XX being overwritten, by pacificnewmedia

    This could be a problem with the theme, but I have no idea why or where it would be checking and overwriting this, as the ‘customize’ feature is built into the wordpress core.

    The issue occurs when I am moving a development site from a subdirectory (WPSubdirectory below) to a root directory (ROOT below).

    1. This morning I completely duplicated the a WPSubdirectory site files and database. I downloaded the database and manually did a search and replace on the URL to prepare for the transfer.

    2. Then, I created a new database and uploaded the database to it

    3. I edited the config file of the WPSubdirectory version of the site to point to this new database.
    Now, with a brand new database and copy of the files, I did the transfer.

    4. I moved all of the ROOT files into a newly created ‘oldsite’ directory, and the WPSubdirectory files into the ROOT directory

    5. Now, when I hit the ROOT address, I am presented with the new site version. However, there are custom theme settings missing, including navigation menu positions, some custom CSS settings, and the logo image etc.

    6. I narrowed it down to a spot in the database where the theme settings are stored, in the wp_options table, there is a value called ‘theme_mods_coastal’. It has what looks like a default:

    a:9:{s:18:”custom_css_post_id”;i:-1}

    7. So I took the custom settings from the WPSubdirectory version of the site, and pasted them into the database.

    8. However, as soon as I visited the website, it still looked the same. I looked back in the database, and it is overwritten again to no settings

    a:9:{s:18:”custom_css_post_id”;i:-1}

    I tried with the version of WP and plugins that it originally had, and I tried updating the wordpress version and all plugins and themes that had updates and it still gave the same problem.

    Any ideas?

    WP_Option theme_mods_XX being overwritten
     
    #1

Share This Page

Web Hosting