I've done my share of searching, but apparently my search-fu is failing me, because I haven't found anything that really seems to fit my circumstance. Also, I don't want to just try random solutions and end up bricking everything.

I have a client who has previously managed her site and installations herself and has now hired me on to take things over.

Currently there is one hosting account with two domains.

The host is GoDaddy. It's a Deluxe linux account.

  • There is a Wordpress installation in the root directory of the account, currently serving domain1.com
  • There is a second Wordpress installation in a directory (domain1.com/domain2). This install is suppose to be serving domain2.com. Which it does, but it's also posing a bunch of problems.

Under the installation for domain2.com ( installed in domain1.com/domain2 ), I can't change the permalink settings to anything but default with out breaking the entire site.

  • Changing the permalink settings results in the warning that Wordpress can't write to .htaccess. Despite the .htaccess permissions being set to 644 (I even tried 777).
  • So I manually edited the .htaccess file to Wordpress's generated content.
  • This results in the site 'breaking'. The front page shows some default content that I don't recognize and none of the links result in pages being loaded. Just the default 'page not found'.

Under the General settings the install is set to:

WordPress Address (URL) : http://www.domain1.com/domain2
Site Address (URL) : http://www.domain2.com

IS it possible to successfully run two separate domains from two separate Wordpress installs, under the same hosting account, with out switching everything over to a network?

1 Answer 1


Serve both sites from the same installation.

In your wp-config.php include the settings depending on $_SERVER['HTTP_HOST'].

Example for a complete wp-config.php:

define( 'DB_HOST',     'localhost' );
define( 'DB_CHARSET',  'utf8' );
define( 'DB_COLLATE',  'utf8_general_ci' );

if ( 'example.net' === $_SERVER['HTTP_HOST'] ) // .net domain
    include 'example.net.config.php';
elseif ( 'example.com' === $_SERVER['HTTP_HOST'] ) // .com domain
    include 'example.com.config.php';
    die( 'something went wrong' ); // improve this error message

defined( 'ABSPATH' ) || define( 'ABSPATH', dirname( __FILE__ ) . '/' );

The .htaccess rewrite rules for single site installations are always the same, so don’t worry about conflicts.

If there are some identical settings in example.net.config.php and example.com.config.php you can move these to the main file, the authentication keys and salts for example or basic DB constants.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.