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 (1)

  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

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 jQuery Lazy Load Plugin?

Posted on 4 years ago

Bhumi

The Readers’ Poll – January 2013

Posted on 5 years ago

Bhumi

How to Create a Zip File In PHP

Posted on 6 years ago

Bhumi

What are Traits in PHP

Posted on 3 years ago

Bhumi