1

We have a WordPress site hosted in a basic cPanel environment.

I can create a duplicate of the website and use the four I think it is suggested methods to change the URL.

However I've noted in the WordPress site that there are still links in pages, posts and within the headers for font inclusion that still refer to the original URL.

I've had to previously search for every single reference to the old URL and change it to the new manually. No one talks about database modifications.

Is there anything available to completely switch everything? Changing the files and adding the define() flags is one thing. Having absolute urls in the database is another.

1 Answer 1

2

In your new site, change the value of siteurl. It should be in the first row of the options table in the database. Then you should be able to access wp-admin on the new site. Then install this plugin: Better Search Replace.

2
  • I usually avoid using plugins but in this particular instance, shanebp's recommendation is probably your best option specifically because of serialized data. Running a standard search and replace on a WP DB doesn't work because it'll break the serialized data. Commented Feb 8, 2021 at 0:42
  • Excellent point there. I had that problem ages ago and didn't know how to solve
    – Simon
    Commented Feb 8, 2021 at 22:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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