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.

The perfect time to resolve heartiness problem is before any visible sign appears. Actually there isn’t anything you can’t purchase on the Internet anymore. Whereas erectile dysfunction is more common among older men, that doesn’t something you simply have to live with. What about “canadian pharmacy cialis 5 mg” and “cialis canadian pharmacy“? In our generation, there are divers options for those ones who suffer from erectile disfunction. You may have heard about “canadian pharmacy online cialis“. More information about the question available at “canadian pharmacy cialis 20mg“. Why it happen? Can sexual disorders in men be prevented? If you get any prescription remedies like Viagra, check with a druggist that they are sure to take with your other remedies.

The Top 8 WordPress Developer Tools from 5 years experience
(Hint: They cut down my development time in less than half!)

Get the Top Tools Now!

Comments

  1. Infinite says

    Hey, just wanted to say thank you!

    You saved me a huge headache. I had just switched my site from a main domain to a sub-domain (pretty easily actually) but my admin toolbar would not show up! The instructions I followed didn’t say anything about adding those to the config file.

    Thanks Again!

    • admin says

      🙂 Yeah, it took me a while too to figure this out when I was switching domains.
      Right now I am actually always using a plugin called backupbuddy (http://ithemes.com/purchase/backupbuddy/). I have to switch domains all the time and so far it has worked flawless. But main motivation to use backupbuddy is to auto backup to Amazon S3 servers. Love that service!

    • says

      If I understand you correctly, you are trying to turn your primary domain from your hosting account into an addon domain and replace the primary domain with a different domain?
      To my knowledge only your hosting support can do this.

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.