Steve
Steve

Reputation: 1019

Wordpress second install in subdomain?

I am having a website redesigned. The designers plan to use Wordpress as the CMS and want a development copy to work with. Thing is, I now have Wordpress installed to run a blog (only) on a subdirectory of my current site.

Soooo...question is: Can I create a subdomain, install Wordpress on there, point it at a separate (new) schema on MySQL and have them use that for the development work? I know I can physically do this, but will anything about running the the WP install scripts on the subdomain screw up the existing production install on the main domain?

Upvotes: 1

Views: 8604

Answers (4)

Peter Rowell
Peter Rowell

Reputation: 17713

The install itself should not create any problems. Personally, I always develop WP sites in their own subdomain, allowing me to do away with the wordpress/ subdirectory.

The most significant hurdle will come when you are ready to move the development site to a new domain and/or place in the directory hierarchy. Although the theme files and their associated CSS, JS, etc., files should be using relative-path references, the database itself may contain hundreds of fully qualified URLs that reference the development domain and/or directory.

There are a number of WordPress plugins that address this problems. The one I am most familiar with is BackupBuddy from ithemes.com. (I'm not a shill, just a satisfied customer.) BB is useful both for performing scheduled backups (full or database-only), but it is also very useful during development and during deployment. There is an included script, importbuddy.php, than can not only take a .zip of a full backup and restore the site, it can also move the site from one directory and/or domain to another.

Note: BackupBuddy is not free, but it is released under GPLv2. You are paying for the support necessary to keep it tracking changes in the WP ecosystem. If you are doing any serious WP work then it is money well-spent. You might suggest this to your designers.

Upvotes: 2

whizzzkid
whizzzkid

Reputation: 1295

if you are planning to make a test copy of the current install on a subdomain which includes separate source code and database the answer is NO it will not affect your current installation.

Upvotes: 1

Dan Blows
Dan Blows

Reputation: 21174

Technically, yes you can do it.

However, if you have a live domain with public people using it, you are best not developing on either the same domain or server, because:

  1. Mistakes happen. You can break the database or other code.
  2. While you develop, you can affect performance of the server.

Develop on a local machine, or a completely different server, and when you are happy with it, push the code live onto the production server.

Upvotes: 1

Eray
Eray

Reputation: 7128

Yes you can do it. It doesn't matter. You can install your new blogs to any directory or subdomain (actually they're directories, too). Also you can use new MySQL databases for them, or you can use same database for your all WP installations (by editing wp-config.php manually), thereby you'll have same content for your all WP blogs.

Upvotes: 1

Related Questions