tags:

views:

29

answers:

1

I have a couple of sites that I will be developing locally then when done will upload to respective hosts.

I usually test out in Mamp, but this time will complete the whole site. I have had to move Wordpress sites to different directories before, which was a tad cumbersome.

Are there steps I can take during development that would help with publishing once the site is completed?

THanks.

A: 

Use php functions when building themes so as to not have to change directory paths in themes when changing hosts, like the get_bloginfo functions: http://codex.wordpress.org/Function_Reference/get_bloginfo

Use relative paths in css files, if possible.

And see http://codex.wordpress.org/Moving_WordPress for the best docs on the moving process.

After the move, if you need to change URLs of images within posts and pages (because you can't execute php in posts/pages without plugins and non-use of the visual editor), use SQL queries in phpmyadmin like:

UPDATE wp_posts SET guid = replace(guid, 'http://olddomain.com','http://newdomain.com');

UPDATE wp_posts SET post_content = replace(post_content, 'http://olddomain.com', 'http://newdomain.com');
songdogtech
Thank you! :) Where do you insert the SQL query?
Driftwood
In phpmyadmin, which you've got in MAMP and which is usually available on webhosts in Cpanel and Plesk.
songdogtech
Don't bother with manipulating the guid. Its just that, a guid, and it never sees the light of day unless someone goes snooping in the RSS feed to see that it has a guid. While guids do have a spec the guid could actually be complete gibberish so long as its gibberish that is unique to that post.
Gipetto
thanks folks, really appreciate the time!
Driftwood