Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I moved my wordpress website to a new URL on the same server and managed to update most DB entries with the Velvet Blues Update URLs plugin. But the paths to my pictures, which are being used by the theme were not updated. Now the website can't load them anymore. The pictures' URLs still point to the old place. Is there tool, which can fix that, so I don't have to search for all entries in the DB by myself?

share|improve this question
    
Where are these referenced? Did you hard code paths in your template files? –  GhostToast Jun 26 '13 at 18:40
add comment

1 Answer

Besides doing a custom query in your MYSQL database, I've found this little script to be helpful in my development process, and I've incorporated into my regular workflow to keep my local, development and production servers synchronized:

https://github.com/interconnectit/Search-Replace-DB

Just be sure to read the documentation, especially about overwriting GUID values and also make sure to delete the script after you've made the changes!

share|improve this answer
    
the problem about this tool is, that it seens to replace the whole value assigned to an attribute if it contains the searched phrase. is there a way to replace only the substring of a value? –  Pawel Jun 26 '13 at 18:36
    
Without understanding your specific case, typically when I transfer my db from local, let's say the URL is something.dev, and the production is something.com, I always append the protocol http: before the url http:something.dev (or whatever your URL is, includes www, etc). That seems to correctly target the URLs in media files. I'd suggest backing up your DB and experimenting. –  tnog Jun 26 '13 at 18:45
    
I just updated all my URLs, but now the whole theme reseted itself and looks like freshly installed. What might be the reason? –  Pawel Jun 26 '13 at 18:59
    
Hmm, is this a live site do you have a URL to look at? –  tnog Jun 26 '13 at 19:06
    
Even if I change one single value by hand in the DB, like the background, the theme uses the standardpicture for it. The updated URL is definitely correct, since I can access it with the browser. EDIT: what do you mean by live site? if it's online? The server is up and running. –  Pawel Jun 26 '13 at 19:10
show 5 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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