Back to Top

How to move WordPress from subdomain to subdirectory?

To migrate Wordpress from subdomain to subdirectory

Most of the bloggers keep blog into sub-domain but get the more SEO benefits and increase page rank of the site, sub-directory is good rather than sub-domain. One more reason is inbound links to sub-domains are preserved differently to links which point to the root directory and Sub-domains are less trusted than sub-directories in Google.

However, If you move WordPress blog or forum from sub-domain to sub-directory, it’s easy to move blog to new location but main issue is your blog URLs are submitted into Google and other search engines so until newly generated sitemap not submitted to Google, user will get “not found” link from Google and which affects your site popularity, backlinks and traffic from search engines too.So, It’s necessary that no broken links or 404 errors found.

Read: Introduction to Transient API in WordPress

Today I am going to explain about how to move the WordPress blog to a new sub-directory from sub-domain with considering SEO benefits so visitors will not get “Not found” link till Google does not upgrade links into search engine.

First of all, Backup database and copy WordPress folders and files into new location and set URLs in the database.Then update permalink structure from admin.

Next is the permanent redirection of URL from sub-domain to sub-directory. To move all old previous sub-domain URL’s to the new sub-directory structure, You need to write below .htaccess code which automatically redirects to sub-directory rather than manually adding redirection code for each and every URLs.

Last but not the least, update your XML sitemap and make sure old URL’s are removed from Google search engine otherwise it leads to the duplicate content issue.

Also Read:
To add new URL rewrite rule in WordPress

I’m hoping that you’ve found this article helpful. Don’t hesitate to use this code in your WordPress projects and post your comments if you need help. As always, thanks for reading. Don’t Forget to Follow us on Twitter or Subscribe us to Get the Latest Updates.

Comments (5)

  1. Hola,

    Sinceramente hemos encontado tu entrada del blog verdaderamente útil.
    Esperemos que siga redactando este tipo de entradas! Volveremos
    en breve a su blog para ver las novedades

  2. Great post. I was checking continuously this weblog and I’m inspired!
    Extremely helpful info specifically the remaining part :
    ) I take care of such info a lot. I was seeking this certain information for a very long time.
    Thanks and good luck.

  3. Thanks for some other excellent article. Where else could anybody get that kind of information in such a perfect
    approach of writing? I have a presentation next week, and I’m on the search for such info.

  4. I am really grateful to the holder of this website who has
    shared this wonderful post at at this time.

  5. Hi there friends, good article and nice urging commented at
    this place, I am actually enjoying by these.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Most Popular Posts

How to use PHP Method Chaining?

Posted on 9 years ago

Bhumi

The Readers’ Poll – December 2012

Posted on 11 years ago

Bhumi

How to Parse WordPress RSS Feed?

Posted on 11 years ago

Bhumi

Top 10 JavaScript Charting Libraries

Posted on 9 years ago

Bhumi