Hi All,
I am in marketing, not IT/development so forgive my non-technical description:
I have been tasked with a complete redesign from a no-CMS website with very little in the way of resources or support, as we are a small school, and I have limited technical knowledge. I have one web coordinator also on the project.
We are approaching launch of our new website, built in WordPress, and using an external host, ServInt. During the build, we beta launched the site under the beta. subdomain, as our existing website was still live and the primary site.
We (marketing) as project managers for the redesign have just come to the realization that we will need to go through and remove the "beta" from URLs after launch when the site goes live and takes over the domain without the "beta" or the links will break. This means many, many hours of doing this manually. We had been advised previously that the URLs with beta would continue to work.
Are there any scripts that will do a global "find and replace" across a WordPress multi-site set-up, or any other solutions we can look at?
Also, aside from on-page hyperlinks, how will page URLs be affected? We are in the dark at this point and in need of technical advisement on how best to proceed to be in line with best practices. Our IT dept. is understaffed, over capacity, and was not involved in the project (if that is not already obvious).
Any advice?
Tags: URLs, and, beta, development, find, hyperlinks, links, redesign, replace, scripts, More…site, to, troubleshooting, web
Permalink Reply by Bill Dennen on January 19, 2012 at 4:01pm Do you want all URLs to change from something like:
http://beta.school.edu/something/something-else/
to
http://school.edu/something/something-else/
?
We've done this in the past, in the database itself using this script:
http://interconnectit.com/124/search-and-replace-for-wordpress-data...
It will allow you to safely do a find/replace across your database. As
always, it would make sense to test this on test data before doing it
on you live data. And make backups. :)
Permalink Reply by Sarah McMaster on January 19, 2012 at 4:06pm I owe you big time, my friend. ;)
Permalink Reply by Dave Brenner on January 19, 2012 at 4:39pm This plugin also worked for me in the past. http://wordpress.org/extend/plugins/root-relative-urls/
Permalink Reply by Sarah McMaster on January 19, 2012 at 4:42pm Thank you!! I like having options. ;)
Permalink Reply by Cara Peckens on January 20, 2012 at 9:49am Sarah - Here are the 4 SQL queries to do a find and replace for all URLS both in the content and the permalinks. I use this all the time when I move sites from local development to live sites. Your database manager will know how to run these queries. It takes just a few minutes to do (but always backup your database beforehand). The only things you will need to modify are the two URLS, and the wp_ if you changed the table prefix when you installed Wordpress.
UPDATE wp_options SET option_value = replace(option_value, 'http://www.oldsiteurl.com', 'http://www.newsiteurl.com') WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_posts SET guid = REPLACE (guid, 'http://www.oldsiteurl.com', 'http://www.newsiteurl.com');
UPDATE wp_posts SET post_content = REPLACE (post_content, 'http://www.oldsiteurl.com', 'http://www.newsiteurl.com');
UPDATE wp_postmeta SET meta_value = REPLACE (meta_value, 'http://www.oldsiteurl.com','http://www.newsiteurl.com');
Permalink Reply by Sarah McMaster on January 20, 2012 at 9:51am awesome - thank you!!
Permalink Reply by Bill Dennen on January 20, 2012 at 10:25am Cara, doing it this way could break any serialized data (in wp_options), though. Just something look out for.
One symptom of broken serialized data is that your widgets lose all their settings after the find/replace.
Permalink Reply by Sarah McMaster on January 20, 2012 at 10:34am Thank goodness for the tech people in the audience. My hat is off to both of you, Cara and Bill.
Permalink Reply by Cara Peckens on January 20, 2012 at 10:35am Bill, I've never had that issue as I'm only changing the home and siteurl fields in wp_options table
Permalink Reply by Bill Dennen on January 20, 2012 at 10:39am Ah yes. Good point. Thanks for clarifying!
Permalink Reply by Cara Peckens on January 20, 2012 at 10:41am It's a good point though. You don't want to do a simple search and replace of the sql file in textedit, losing your widgets can be a big ol pain.
Daniel Bashaw replied to Kimbel Jeffers's discussion Office Reservation software
Kimbel Jeffers replied to Kimbel Jeffers's discussion Office Reservation software
Annette Spearman replied to Derek Tonn's discussion Freelance web design recommendations (small projects)
Colleen Brennan-Barry posted a discussion
faris ahmed commented on social networking web design's blog post Megastar Media Webby Award Honorees
Lynn Zawie posted a discussion
Sara Michel commented on Lynn Zawie's group OmniUpdate
Sara Michel commented on Lynn Zawie's group OmniUpdate
Norma J Dowell replied to Derek Tonn's discussion Freelance web design recommendations (small projects)
Daniel Bashaw replied to Kimbel Jeffers's discussion Office Reservation software
Kimbel Jeffers posted a discussion
Sara Michel commented on Lynn Zawie's group OmniUpdate
Helen Mosher posted a status
Sarah McMaster replied to Katra Farah's discussion Online chat interfaces
Daniel Bashaw replied to Katra Farah's discussion Online chat interfacesUWEBD has been in existence for more than 10 years and is the very best email discussion list on the Internet, in any industry, on any topic
© 2013 Created by Mark Greenfield.