0

I have been working on a site where I have created over 150 articles and I have realized that a link I have pasted in at the bottom of all the articles is wrong. It needs to be changed from -

example.com/category/john-doe/

to -

example.com/category/authors/john-doe/

Is there a plugin to help me do this easily rather than having to manually edit over 150 articles?

I have seen the plugin - "Velvet Blues Update URLs" but I don't know if it's the right one to use. I'm not sure if it's simply for changing -

example.com

to -

example.net

or can it actually deal with the address info after the .com as I need? -

example.com/category/john-doe/

to -

example.com/category/authors/john-doe/

I would appreciate any advice guys.

Thanks a lot.

1

Honestly, the best way to do this is to run some queries on the database using regex to search and replace, after the database has been backed up of course.

Before learning more about SQL, I used this: https://interconnectit.com/products/search-and-replace-for-wordpress-databases/, which should work for you in this situation. You download the file, upload it to your public facing directory, and access the URL. Then you just use Regex to find the type of URLs you're looking for, and then specify the replacement. Run it, and you'll be good to go.

Don't forget to delete it after using it though, if you do use it!

  • Running your own queries is a challenging way because of serialized strings which you can break using weak queries. But, Search Replace DB you've mentioned do the job. Also, there is a bunch of WordPress plugins for site migration. – Max Yudin Dec 1 '16 at 16:33
  • Yeah @Max Yudin, I get criticized by coworkers because I always code stuff the challenging way. Kind of a habit I need to break, but I like a challenge. It makes work fun for me. Anyway, using Search Replace DB by Interconnectit will work just fine for you in this situation Falcon Boy. – Tyler Johnson Dec 1 '16 at 21:48
0

Since you asked for a plugin solution, which by the way is the most convenient way as opposed to using direct database search/regex, this is what I use on all of my projects for going easily from staging to production:

https://wordpress.org/plugins/search-and-replace/

You can easily run a test search for your query (so you don't need to make changes on the fly), export your changes as an .SQL file or change the database entries directly. I never encountered any errors, plus support/development for the plugin are most likely to be maintained with this plugin ;).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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