‘Web Lab’: Installing WordPress on a Subdomain or in a Sub Directory

January 13th, 2010 · 6:30 pm @ Amber  -  One Comment

Today we will go over how to create your own 'Web Lab' using WordPress.

Why?

Ever wanted to try out a new theme, or make edits to your existing theme, or try new plugins/functionalities without messing with your live site? Well, creating your own 'Web Lab' is a great way to do that.

I created my own Web Lab so that I could develop my own themes, modify themes I liked, and in general, mess around and experiment. By keeping it separate from live site, I make sure that a disaster doesn't ruin all my hard work. Or, on the reverse, if I stumble upon something truly amazing, I can refine it until I'm ready to release it officially.

Ex:

My old homepage:

My new homepage:

How?

It's easy, all this article assumes is that you have a self-hosted WordPress blog/website and a good web host.

Table of Contents:

  1. Pick your poison (subdomain vs. sub directory)
  2. Set the Table (install)
  3. Meat & potatoes (Import/Export)
  4. Gravy (Finishing touches)

1. Pick your poison.

As always, the first step is making the decisions. You can either:

A: Create a subdomain on your existing domain and install a second WordPress on the root.

  • ie: I created  http://labs.amberseree.com

B: Install a second WordPress in a sub directory.

  • ie: http://amberseree.com/labs

Which one should I use?

Either one is ok. Here are some things to think about.

  • If you decide to install wordpress on a subdomain, make sure your web host supports subdomains, and make sure they are free.
  • If you install in a subdirectory, make sure the URL (path) doesn't conflict with something else on your main site. ie: My permalink structure is set to %postname%, which means my relative path will display my domain name / the page title. If I have a page named "Labs" {http://amberseree.com/labs} and I install WordPress in a sub directory called "labs" {http://amberseree.com/labs} then I have a problem. I honestly can't remember which one over-rides which, but I'd just say, avoid it!

2. Set the Table.

A: If you've decided to install on a subdomain, you'll need to create the subdomain first. Once you've created that subdomain, go ahead and install WordPress, preferably using a 1 click installation program provided by your web host, like Installatron or Fantastico, on the subdomain. The install wizard should give you options like http://yourdomain.com, http://www.yourdomain.com, http://subdomain.yourdomain.com etc. You should of course choose the one that looks like this http://subdomain.yourdomain.com. It will probably give you the option of an extra path like http://subdomain.yourdomain.com/wordpress, but if you want to install on the root, then delete the "wordpress" from the path. Don't have 1 click install? Here is a WordPress tutorial on installing it yourself, though it's not recommended. I'd go with a web host with a 1 click option. You can get great web hosting @ Cruzio.

The path would look something like this ("labs" would be the subdomain, whatever you call it): /httpdocs/subdomains/labs/

B: If you've decided to install in a sub directory, just install WordPress using the 1 click function from your web host, like Installatron or Fantastico, and when it asks for the path, you choose the domain where you would like to install, http://yourdomain.com, and then it will proabably try to automatically fill in a sub directory called "wordpress", but you can just edit that and call your sub directory whatever you want, like "labs" or "weblabs".

The path would look something like this ("labs" would be the sub directory, whatever you call it): /httpdocs/labs/


3. Meat & Potatoes

Now that you've installed your "lab" you can finish creating it.

First thing you can do is in your live website, under Tools>>Export, you can export your posts etc and then again in your lab go to Tools>>Import and voila! you have all the content you've already created. Now you have a couple options on how to proceed, or you can choose all three!

A: If you want to work on a new theme just download it, install & activate and get busy!

B: If you want to develop your own, I'd recommend using a bare bones theme like Starkers, Thematic, or another Theme Framework of your choice.

C: If you want to work on your own theme, either install a fresh version, or copy the theme folder onto your desktop and then install it in your lab.

From this point on you can install plugins, play around with widgets, images and anything else you want without worrying about people seeing it (if you don't want them to). If you are especially worried about it, in your lab, you can go to Settings>>Privacy and choose to hide your blog from search engines.

4. Gravy

This step is all about you. What do you want to do with your lab? What have you done with your lab? I'm working on a new theme and I'll be happy to share it with you all here. Please comment and share your thoughts/experiments!

  • Spread the Love | float & share

One Comment → “‘Web Lab’: Installing WordPress on a Subdomain or in a Sub Directory”


  1. Sasha

    4 months ago

    ...

    Excellent news ...


What do you think? (leave a reply)