Tagged: 

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #19788

    Hello, I recently moved my site built with Flagship to a new server and have a new URL (it was built on a dev URL and then moved to the clients hosting). Upon moving the site and updating the URL references in the database from the old one to the new one the site completely loses its Flagship options and setting. Any ideas why this would occur or how I would stop it from happening?

    #105033

    Hi sbxstrategies,

    The only reason I can think of would be if you changed the theme name. Since wordpress saves the options for each based on its name, changing a theme name in the main style.css of the theme would cause it to use a new set of entries in the wp_options table.

    Regards,

    Devin

    #105034

    I also had the same experience, but using Velvet 1.3 – developed site on test server, saved a backup of files and database, updated url references, and loaded onto live server. Upon first viewing the site on the live server, all the customized theme options (dynamic templates, etc) were not there and I had to re-do each option manually on the live site, looking at the settings pages on the temp site for reference. It was a pain, but it worked.

    I can confirm that the same thing happens when you change the theme name in style.css since I stupidly did that too, a few days after that. But the problem definitely occurred just in moving the site to a new database and server, with no other changes made to the name or site files. The only change was updating the URLs in the database.

    #105035

    It definitely shouldn’t. All the theme settings are saved in the wp_options and are attached to the theme name.

    I’ll tag the topic for Kriesi to see if he has any other suggestions.

    Regards,

    Devin

    #105036

    Hey Guys! I cant reproduce these issues but I have been told that it happens from time to time, probably due to different server settings.

    Could any of you do the following:

    Do a database export from your local installation, import it to your live server and then send me access details to your ftp server and myphp-admin? I can than fix the issue once and for all :)

    Just make sure that after importing the database to the live server you press the save settings button in your admin panel so i can do some trial and error testing…

    You can use the contact form here to send me your login credentials: http://www.kriesi.at/contact

    #105037

    Hey guys, thank-you for the posts. There were no theme file name changes.

    Straight up:

    1) Copied database and site files to new location

    2) Did a standard URL replace on the database

    3) Voila, no theme options working.

    So in the meantime I copied the database again but did not do a find/replace on the instances of the dev URL but went into phpmyadmin and updated the server manually for the wordpress location. The site works but I know there are thousands of references to the dev location and if I kill the dev location my site will go with it.

    Kresi, I am willing to install a copy of the site in another URL I am not using. I will do the find/replace on the database and get the site up and running to reproduce the issue on a location I don;t care about. I can let you in there to do whatever you need to so that way if something blows up there is no loss. If you are okay with that I will send the details.

    Thoughts?

    #105038

    Hey!

    With your detailed description you might have given me the final clue to the solution. I think the search/replace of the URL also iterates over the database entry that holds all the framework information.

    The problem here: this information is stored as a serialized array, which means any direct changes to the database (like a URL replacement) might mess the serialization up.

    Serialized entries always have a number before each entry. for example {20:http://www.kriesi.at} the number describes the character count of the string that follows. If the number doesnt match, the serialization is broken and fetching the entry will return an empty value. So if you run a search/replace on the domain name and the new domain has a different character count than your test server, which is very likely, then the array gets messed up.

    Why does it happen for only a few people: because there are few framework options that actually store a URL. From the top of my head the only ones that I can think of are custom logos and favicons.

    If you want to test this theory before setting up a new installation for me: reset the custom logo and the custom favicon, then create a new database dump and import it to the live server. If everything works then, you dont need to setup a new installation for me ;)

    In the meantime I will test it myself as well and try to find a solution if its the cause of the problem.

    #105039

    New to this forum. Just did the same exact deployment that others have outlined above. Same issue for me, all of my theme settings I’ve set in my dev environment disappeared.

    #105040

    FOUND A FIX:

    Just install WP MIGRATE DB plugin on your local dev installation. Follow directions and it will output a properly formed .SQL replacing all the serialized strings as it should. Just did it and voila, perfect migration. Good times.

    #105041

    Hey lostyetidesign,

    Good to know!

    Thanks for the added input :)

    Regards,

    Devin

    #105042

    lostyetidesign, thanks for the plugin fix.

    Kreisi, so theoretically if I go into the admin of the live site as I have it now and save the new location of the logo and the favicon, then I go to the database and do the find/replace it should be fine? Reason I ask this is I already moved the site and this would save me from duplicating the database (after removing the custom logo and favicon as suggested) and then attaching the site to the updated database. I’d understand that you may say this is a “do at your own risk” kinda scenario… in which case I should just go ahead and duplicate the database and then follow either lostyetidesign’s idea or your Krisei.

    #105043

    I think you would need to find the entries for the favicon and the logo and change number for the correct character count for that entry. They would be in the in avia_options_flagship in the wp_options table.

    #105044

    Hi,

    Your best option if you are lucky, is to have your old and new site having an identical number of characters in the domain name. Otherwise you can be looking at a lot of work. I recently searched a mysql wordpress dump and it showed the domain in some 300 places that you will need to replace along with modifying the number of characters for a portion of those 300.

    A better option may be to download the free http://serverpress.com/downloads/ application, and then to use the ‘copy website’ option, which will ask for a new website url and automatically make the substitutions as well as count the number of characters for you during the copy process..

    Thanks,

    Nick

    #105045

    Hey! @ sbxstrategies:

    Since I am not sure anymore what you current state of the database is I cant give definite advice.

    If you have moved your database from the test installation to the new server and never ever pressed the save options button in your wordpress backend after the URL search/replace it might be enough to modify the avia_options_flagship array in the wp_options table.

    Enter the old! values for your logo and favicon. That should basically “unbreak” the installation and the theme should be able to find all the settings again. Of course, if you now add another logo/favicon and save it with the theme options this will work fine, since the theme does correctly serialize the new data before saving.

    However, at this point I am not sure if it isnt easier to create a new dump from your testinstallation and use one of the plugins that were mentioned. Meanwhile I will check if there is a way around that for the future

    #105046

    also for me WP MIGRATE DB plugin works perfect!!!
    ;)

Viewing 15 posts - 1 through 15 (of 15 total)

The topic ‘Move site to new server, lost all theme option’ is closed to new replies.