Starting An Online Business From Scratch?

Follow our 5-Phase Roadmap for starting, building and growing a high-revenue blog-based business... out of thin air.

__CONFIG_colors_palette__{"active_palette":0,"config":{"colors":{"62516":{"name":"Main Accent","parent":-1}},"gradients":[]},"palettes":[{"name":"Default Palette","value":{"colors":{"62516":{"val":"rgb(19, 114, 211)","hsl":{"h":210,"s":0.83,"l":0.45}}},"gradients":[]}}]}__CONFIG_colors_palette__
Download Now

How To Run A Site-Wide Search & Replace On WordPress

Last Updated on June 1, 2016  

 

This is Day 18 of the 30 Days, 30 Killer WordPress Plug-ins Series.

Sometimes you need to do a site-wide search & replace on your site. Fortunately, being that all of the content on a WordPress site sits in a database, it is pretty easy to do.

As an example, when I converted this site from davidrisley.com to blogmarketingacademy.com, I had a bunch of links to change out. I want to change ALL of my internal links so that they used the new domain.

How did I do it? I used the Search & Replace plug-in.

Here’s what it looks like:

searchandreplace

Not exactly non-geeky, but it works. To make the most sense of the interface, you’d need to know the basic structure of the WordPress database. Then you’ll know what fields are being affected.

It is simple to use. You check off which section of the database you want to run the operation on. You enter your search text – then what you want to replace it with. Then, hit “Go” and it’ll do the job.

Now, two words of warning on using a plug-in like this:

  1. You have to be very careful what you enter as your search and replace text. It needs to be a direct replacement. This plug-in looks at each database field as nothing but a block of characters. It isn’t going to exercise any judgement as it progresses, so you need to be very sure you enter the fields correctly.
  2. A plug-in like this can do a lot of damage if you screw it up. It is directly impacting the database fields of your site. It isn’t anything you need to sweat bullets over, but you do need to be careful. And most importantly, you need to BACK UP YOUR DATABASE. Don’t run an operation like this without a backup you can restore if you screw something up.

In my case of changing the links, I chose the “Content” option (since I wanted to replace links within pages and posts). I enter “davidrisley.com” as the “Replace” text, and I enter “blogmarketingacademy.com” as the “with”. This operation would be very precise about replacing all instances of my domains which were contained within link HTML, and anything which came AFTER the root domain in the link would be left untouched.

Other possible uses for it include:

  • If you use an affiliate link throughout your site and you weren’t using a redirection plug-in like Pretty Link – and let’s say the affiliate link changed… you could use this to replace the link site-wide.
  • Talking about a product on your blog, and later find they re-branded and go by a different name? You can change the product name through your blog.
  • Change image URLs if you moved the location of your images (which would otherwise result in broken images all over your site).

You get the idea. Very useful if you’re making structural changes to your site. But, definitely use it with care. And, I’d recommend you de-activate the plug-in when you’re not using it.

——-

Keep up with the latest in this 30-day series by staying connected!

You can enter your email below and I’ll keep you in the loop….

[contentblock id=11 img=optin.png]

FREE DOWNLOAD: Get your copy of our flagship process checklist for building your online business out of thin air: The Online Business Roadmap. Starts from zero. No email list, no traffic, no blog, no product. The process will guide you through all of it. Sign up for your FREE LAB member account here to get instant access!


TOPICS


Related Articles You Might Like:

Why And How I Switched My Optins From Thrive Leads To ConvertBox

{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}

Online Business Training (For Blog Owners)

Starts From Zero. Goes In Order. All The Support You'll Need.

>
11 Shares
Share
Tweet
Share