Im having this issue that happens to me each time i work on a website.

On every project i start working locally and once im done i export my Database and search replace all localhost url's to the website destination url.

than in cpanel i create a database user name and password.

i modify wp-config.

the website works fine all pages working just one thing wont work: Theme Options wont show

my theme options and widgets wont show up and i have to redo this process from the beginning each time and redo all the settings. i have read a lot about it: http://codex.wordpress.org/Moving_WordPress

but still don't know what am i doing wrong.

same thing happens when i try to install a site on local host from a backup.

is there a tutorial on how to do this right.

Thanks in advance

  • 1
    how are you performing the search and replace? – Milo Mar 9 '13 at 15:16
  • i open my sql file and serach replace the url so if im on localhost it will be localhost:8888/mysite to mysite.com i also tried to use this tool that deals with serialized interconnectit.com/products/… and still i cant solve the problem. thank you in advance – Daniel Mar 10 '13 at 0:48
  • it's mentioned on the page you linked in your question. the issue typically arises from changing data that is serialized. it invalidates all of the data in the field because the length of the string changes. this has the effect you describe if for example your widget or theme options contain the url of an image. the search and replace script you linked is supposed to prevent this by changing the stored length when serialized strings are modified. there really shouldn't be any other issue, but it's difficult to say without looking at your actual data. – Milo Mar 10 '13 at 1:03
  • Thank you for the reply. i know what it means and what it does but still it doesnt solve the problem. am i the only one who has this problem? there should be an easy way in this process of migrations. – Daniel Mar 10 '13 at 1:08
  • 1
    that's the only case I've experienced first-hand, so not sure what else it could be. I would start by finding exactly where your widget and option data is amongst your SQL file and comparing the before/after just as a sanity check. – Milo Mar 10 '13 at 1:14

The way I've always migrated sites is not by search and replacing, but just by changing two fields in wp_options: siteurl and home. Try doing only this, no search and replace, and see if it fixes your options page / widgets. It may be that by replacing all instances of "localhost," you're actually impairing your theme's ability to locate itself, in a sense.

  • This won't correct problems with embedded URLs and media attachments that can show up in a migration. – s_ha_dum Mar 9 '13 at 16:27
  • Thanks for the reply. i replaced these 2 links with example(localhost:8888/mysite ) i did as you said but the images still wont show same issue :( so by changing these 2 links only this should work? what if all the url's in the sql file are pointing to a different url ? will it still work by changing the wp_options only? thank you! – Daniel Mar 10 '13 at 0:04
  • If the images embedded in your posts are hard-linked to the old server, they won't show up. I'd recommend using a plugin like Search Regex to search/replace through just your post/page content. Again, you may not have been doing anything wrong in search/replacing the whole SQL file... I've just never heard of it done that way and so that would be the first place I'd look for problems. Consider also @Milo 's suggestion above about doing a manual sanity check to see if you can figure out what's going on. – bcorkins Mar 10 '13 at 18:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.