OK – so you’ve built a killer blog using Wordpress, and there’s loads of great articles and tips on there that link back to your site, driving loads of useful traffic.
And then – BLAM – one of your web developers changes your site structure, the URLs change and all of your links are broken. Aaaaargh!
OK – so you can solve it with a 301 redirect – but the best link juice comes from direct links to the correct URL – so you need to find and replace all the links in your Wordpress site.
Suprisingly, Wordpress doesn’t have a built in Find and Replace feature – so finding and reaplacing all of the links in your post is going to take aaaaaages – right?!
Wrong! All Wordpress sites use a MySQL database as their back-end. So – if you can get at that database viaphpMyAdmin (if you ask your web host they’ll tell you how), you can update all of the URLs in the whole blog (or any other text for that matter) using a simple command.
Here’s how…
How to Find and Replace all URLs in a Wordpress Blog
1. Log in to phpMyAdmin and select your Wordpress blog’s database from the drop-down:
3. You’ll now see a big empty box where you can add SQL commands. Carefully copy and paste the command below in to the box, and replace http://oldurl.com and http://oldurl.com with the actual links you want to find and replace
UPDATE wp_posts SET post_content = REPLACE (post_content, ‘http://oldurl.com’, ‘http://newurl.com’);
4. Now just hit the “Go” button to run the command, and hey-presto – you’ve replaced all of the links in your whole Wordpress blog with the correct URL – that’s just saved you about an hour of trudging through all your posts one by one!!
Don’t forget to check out our Wordpress Training Courses if you want to get to grips fully with Wordpress.
Similar posts you may like
- Wordpress SEO – 10 top tips
- How Do I Get Links to My Site? Use Your Social Media Linkerati – A 3 Step Guide
- Joomla vs Wordpress comparison
- Writing a Wordpress Blog Post: 8 Top Tips
- Advanced Wordpress Training for Custom Themes Now Available
Tags
Find and Replace in Wordpress, Find and Replace links, Find and replace links Wordpress, Find and Replace URLs,Find and replace URLs Wordpress, How to find and replace in Wordpress, phpMyAdmin, Wordpress, WordPress Training
No comments:
Post a Comment