Installing Second Copy of Wordpress in Sub-domain Directory

At times, you may need to have another Wordpress site besides the main Wordpress site at your root directory, for example, another Wordpress site for your sub-domain.

If you are contemplating whether you can install the Wordpress directly into your sub-domain directory to do your design and development works while keeping the current static website, the answer is unfortunately “No”.

You can’t Install Wordpress in the Same Directory as Static Site
If you already have some static html pages inside your sub-domain directory then you have to either install the Wordpress into a separate sub-folder or another sub-domain directory. This is because the static “index.html” will take precedence over the “index.php” so you never get chance to preview the new Wordpress theme. In short, you can’t work on the new Wordpress site while having your old static html site running live.

Uninstall Wordpress Manually
If you have accidentally installed the Wordpress inside the sub-directory, you can delete all the files manually using the FTP. Then proceed to your cPanel and delete away the database. You can’t use this database as it has already contained your previous Wordpress installation information. You will get error for the next installation if you do so.

Install Wordpress Manually in Sub-domain Directory
Installing Wordpress using Fantastico could be fast and easy but some web hosting companies do not have any option to choose another or new database while installing. If you plan to use the same database as your main Wordpress installation in the root directory then you can skip this paragraph. However, it is recommended you choose a new database so that if your first database is corrupted, it will not endanger other sites. In another words, your second Wordpress site or sub-domain will be safe and sound even though the other Wordpress site is down.

While installing the database, just in case you are not aware, you can use back the same database name, username and password as you have created previously. The database is totally new even though it is using the same name as before. If your browser has auto-fill feature switch on, it should help you save a lot of time without re-entering everything.

You can use the “MySQL Database Wizard” in the cPanel to help you when creating your database. It guides you step by step so that you won’t miss out anything.

Steps involved in installing Wordpress

To install the Wordpress manually, you can first download the latest copy and follow the below steps to start.
  1. Download the latest Wordpress from Wordpress.org to your hard disk.
  2. Unzip it and look for “wp-config-sample.php”.
  3. Copy and rename the new copy as “wp-config.php”.
  4. Open up “wp-config.php” and fill in your database name, username and password.
  5. Save the copy and use FTP to upload the whole Wordpress files to the directory you wish to install, for example, “test.mydomain.com”.
  6. Once it is finished, go to the browser and enter “test.mydomain.com/wp-admin/install.php” to start installing the Wordpress.
  7. Enter your username, password and email to proceed.
  8. The message will inform you once you have successfully installed the Wordpress.
For detailed instructions on how to install Wordpress manually, you can visit Wordpress.org by clicking here.

Comments

  1. HI
    I re read your article but I cant figure it out how to have multiple databases.
    Can you be a bit more precise on that point?

    Thanks

    ReplyDelete
  2. I am familiar with subdomain installs (next_site.mysite.com) but I have a separate question to you:

    I want my url as http://mysite.com/next_site i.e inside a folder. I read that this way the new site gets benefits accrued to http://mysite.com.

    But the problem being, how to install this using cPanel? I tried using the subdomain script, specified next_site as the subdomain, gggggg as the folder.

    How can this be done?

    Thanks

    Pagula

    ReplyDelete
  3. If you want to install wordpress in "next_site", use Fantastico to do it. You can enter the directory name when it asks you during the installation.

    ReplyDelete

Post a Comment

Popular posts from this blog

How To Create 3 Columns Widgetized Footer In Headway 3?

Headway Visual Editor not Loading in the Browser

How to Add a Static Home Page to a Blog?