A non-profit organisation (NPO) has a Wordpress website. The URL (example.com) carries the name of the NPO. The name of the NPO has changed so now we need to change the URL to reflect the new name. How do we do this, please?


The easiest way is to use search and replace for wordpress databases

Then you should do a 301 redirect the old domain to the new domain to keep visitors and indexed in Google.

RewriteEngine On

RewriteCond %{HTTP_HOST} !^old-domain\.com [NC]

RewriteRule (.*) http://new-domain.com/$1 [R=301,L]

I hope I've helped you with my answer.


If you already own name 2 as a domain, Build your web site on it, and when you are done you can redirect from old domain to the new one. That way you gain the power of the old domain too.


Have you tried editing your wp-config.php? If not, try to add or replace this value :

    define('PROTOCOL', 'http://');
    define('DOMAIN_NAME', 'domain.tld');
    define('PATH_TO_WP', '/'); // if your WordPress is in a subdirectory.
    define('WP_HOME', WP_SITEURL . PATH_TO_WP); // root of your WordPress install 

The wp-config.php is located in the root of your project directory by default. Here is the wordpress documentation. Hope that helps.


While changing the Site URL under Settings -> General will change the website URL, it will also break the site.

You should download the Search and replace tool, copy it on your webserver, run it and follow the on-screen instruction. The script will modify all the links in your db to reflect the domain change.

  • Please discuss what the search and replace tool does instead of just posting a link – DᴀʀᴛʜVᴀᴅᴇʀ Jul 4 '16 at 1:48
  • The script will modify all the links in your db to reflect the domain change - that is enough explanation. – user1049961 Jul 4 '16 at 6:57

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.