Quite often, some site owners realize that the domain name they picked and used for their Joomla website doesn’t cut it anymore, so they decide to change it and move their Joomla website to another (better) domain. In this guide, we provide step-by-step instructions on how to do that:
Step 1 – Move your Joomla website to another server: We have already discussed that before so we won’t discuss it here again. Just make sure you don’t delete any files/data from the old website until your Joomla website is fully moved and tested.
Step 2 – Replace all links in your website pointing to the old domain with equivalent links pointing to the new domain: Frequently when you write an article in Joomla, you tend to link to another article on your website – which is a good practice. However, when you decide to move to another domain, you will have to update these links to point to the new domain. This can be done in two ways:
- The slow and inefficient way: Where you will have to edit each article and update the links manually. This is OK if you have a few articles with links to your website in them, but when you have more, this can become a very tedious and long task (not to mention that it’s possible for you to forget about some links to your previous website, which will make the thing very messy).
The fast and efficient way: You can just update all the links with a simple REPLACE query issued on your jos_content table. Here’s the replace query:
UPDATE jos_content SET introtext =REPLACE(introtext, 'http://www.yourolddomain.com', 'http://www.yournewdomain.com'), fulltext =REPLACE(fulltext, 'http://www.yourolddomain.com', 'http://www.yournewdomain.com');
Step 3 – Tell search engines that you changed your domain
It is very normal that search engines (especially Google) will maintain an index of your old website and still point to it in their search queries. You need to tell Google (and other search engines) about the change, and the way to do it is to add the following code to your .htaccess file for your old domain:
RewriteRule (.*) http://www.yournewdomain.com/$1 [R=301,L]
If you’re having problems moving your Joomla website from one domain to another, then go ahead and contact us! We’re always here to help!