Home Move WordPress to a Subdomain or Addondomain
Post
Cancel

Move WordPress to a Subdomain or Addondomain

Here is a quick and little trick to move WordPress to a subdomain or addon domain.

Assume you have a WordPress install under

public_html

and you can access your WordPress site via

www.your_domain.com

but what you want to access your WordPress site it via a subdomain. Lets use /blog for this example. The same concept applies to addon domains.
Our goal is to access our WordPress site via:

www.your_domain.com/blog

Here are the steps to move WordPress:

  1. Create a folder blog in public_html (or whatever your root html folder is called).
  2. Move all files from WordPress to public_html/blog
  3. Edit wp-config.php. Add in right at the beginning: ```
    define('WP_SITEURL', 'http://www.your_domain.com/blog/');
     define('WP_HOME', 'http://www.your_domain.com/blog/');
     ```
    
    

You are all set. Enjoy your moved WordPress site on your new subdomain or domain.

This post is licensed under CC BY 4.0 by the author.
Trending Tags