Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

URL upset WordPress


After development was completed and rolled out successfully, my client created a subdomain that he preferred the URL and updated the site General Settings. He then promptly called to let me know he had trashed the site.
There is no longer access to the admin account as all URLs to wp-admin are broken. The site itself is still visible, but the links to content appear broken.

He logged into the dashboard and under Settings he selected 'General' and he edited the existing Wordpress Address (URL) and Site Address (Url). Is there any way to reverse this? Rather, is there a better way to update the subdomain with breaking the site?

Given that he has made this change after development and roll-out, what is the best procedure for updating the site to the new subdomain he has chosen? Does this require search and replace? If so, is it just as well to delete the software and reinstall from the development site?

Help. Site went live today and looked beautiful for exactly 3 hrs.

broken admin link:


dev site:

I am aware of this advice:

<em> When Your Domain Name or URLs Change

When your domain name or URLs change - i.e. from to, or to - there are additional concerns. The files and database can be moved, however references to the old domain name or location will remain in the database, and that can cause issues with links or theme display.

If you do a search and replace on your entire database to change the URLs, you can cause issues with data serialization, due to the fact that some themes and widgets store values with the length of your URL marked. When this changes, things break. To avoid that serialization issue, you have two options:

Only perform a search and replace on the wp_posts table.
Use the Search and Replace for WordPress Databases Script to safely change all instances. </em>

If this is the next best option, where do I find the wp_posts table?

Answers (4)


Basilis Kanonidis answers:

Go to wp-config.php and add the following:

little D comments:

Thank you. That's all it took!


Sabby Sam answers:

when You want to move your wp site to another url then you need to replace the url.

For Eg: is the original url and you need to move the site to the
then you need to replace the url with sub domain in the database file.

Go to your database , export your db file and open in the notepad replace your url and then delete the current database and export your database again.
Hope this will help you.

and this are some transfer wp plugin


Luis Abarca answers:

Add the define in wp-config.php and in your functions.php add





Luis Abarca comments:

to update wp_posts you need acces to your mysql database, with phpMyAdmin maybe

UPDATE wp_options SET option_value = replace(option_value, '', '') WHERE option_name = 'home' OR option_name = 'siteurl';

UPDATE wp_posts SET guid = replace(guid, '', '');

UPDATE wp_posts SET post_content = replace(post_content, '', '');


Abdelhadi Touil answers:

To reverse what your client hav done, you must edit website setting via phpMyadmin and edit Options table in the wordpress database, then you can find a plugin to search and replace all old url to the new one.
Good luck.

Abdelhadi Touil comments:

This link may help you:
and also you can search for:

Abdelhadi Touil comments:

and this is great to:
Good luck.