ThemeShaper Forums » Thematic


Widgets and Changing Site Hosts

(5 posts)
  • Started 9 years ago by oakview
  • Latest reply from oakview
  • This topic is not resolved
  1. oakview

    In the past, whenever I move a website from my development server to the clients host, I have to manually re-create all the sidebar widgets. I found reference to "the reason" in this post:

    Is Gene's solution still a valid workaround?

    search for:

    if ( isset( $_GET['activated'] ) ) {
      		update_option( 'sidebars_widgets', apply_filters('thematic_preset_widgets',$preset_widgets ));

    and replace with:

    if ( isset( $_GET['activated'] ) && get_bloginfo( 'stylesheet_directory', FALSE ) == get_bloginfo( 'template_directory', FALSE ) ) {
    		update_option( 'sidebars_widgets',
    		apply_filters('thematic_preset_widgets',$preset_widgets ));
    Posted 9 years ago #
  2. I'm not sure how the code above would work with migration from development to live . If I am reading that code correctly, it is really was only meant to keep widgets set in their respective sidebar locations when switching child themes.

    This issue with widgets being flung to the inactive bin when switching thematic & child themes was resolved in the branch under development. You could try updating to the latest from the svn for that fix.

    But i think what you have going on is different. If you migrate your database from dev to live properly all should be well and the widget should not move. If you are simply exporting through the dev's wp-admin and importing it back into the live site the code above will do you no good.


    Posted 9 years ago #
  3. oakview

    Thanks Gene - it's not a huge deal as I don't have a lot of widgets. In a nutshell, I export the DB contents via phpMyAdmin to an SQL query, then import the query contents into the new DB. Before the import however, I do a search and replace on the query, replacing the dev location URL's with the new site URL. I would think that has no bearing on the widgets, but perhaps I'm missing something.

    When I do the site move this time, I'll try to remember and post back with the results of the widgets dispositions with repect to Thematic. Last time this happened was with a completely custom theme built from the ground up. I'll just bet I didn't register the widgets properly.

    Posted 9 years ago #
  4. Sounds like you've got it right on the db migration. I can't think why you'd lose wodget postitions after the migration unless you're switching themes. I'm interested to hear what happens.

    Posted 9 years ago #
  5. oakview

    I went live with the site last night, and yes, I did have to re-create the widgets. Not a huge deal since I just copy and past from the dev site, but annoying. This installation had to be done differently due to some host constraints, so I did have to change themes, causing the widgets to disappear as expected.

    I had to put the Launchpad theme up first, then change to the Thematic child theme after a large amount of file uploads completed. There is nearly a gigabyte worth of videos on the site, some as backup - took a while due to the hosts dismal FTP transfer rate (29Kb/sec). Their server is slow enough that some of the pages have to be refreshed to see them, and the videos often pause to buffer. Pretty sure the client will want to move the site after I told him there are way better hosts out there, Hostgator for one.

    New site built on Thematic:
    Studio Wings - Aerial Production Specialists

    I'll try to remember this thread next time I move a site. Usually I populate the DB first, then move the files, so if what you said about the widgets not moving means that I should be doing the move in a different order, I'm all ears. Matter of fact, I'd be interested in what steps you do when moving a site, and in what order.

    Posted 9 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.