• As the title said, I did a network install with subdomains as my option… turned out that maybe I chose the wrong thing? I am on justhost and I have added the wildcard subdomain on cpanel. Well, it sort of worked. With no sites, all subdomains redirect to the main site as expected.

    When I added a subdomain site, it gave me all the welcome emails with the address and everything. Except when visiting the subdomain, it gave me an “Error establishing a database connection” text. On WP>Super Admin>Sites, The Visit link goes to: “wp-admin/ms-sites.php” and the Backend link goes to “wp-admin”. Under Dashboard>My Sites strangely there are 2 sets of “Visit | Dashboard” links, one with my main site’s name above it, and the other with nothing above it. Is it supposed to be like this?

    If nothing is working out I’m actually thinking of switching to subdirectories but don’t know how. Do I just modify wp-config?

    Thanks a lot for the help.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Did you ask support at justhost if they support the wildcard subdomains? Becasue they have to have the server set up for it, in addition to the dns record you made for it.

    Thread Starter haloid

    (@haloid)

    @andrea_r:
    Thank you for the reply. I have asked and also researched them and the answer I got every time is that they do support wildcard subdomains.

    I am still confused on what I actually did wrong. Was it the part where I had to “replace all WordPress lines” in .htaccess with what they provided me in the Admin panel?

    There is also this thread and the original poster also uses Just Host with wildcard subdomains, in which you asked the same thing:
    http://wordpress.org/support/topic/can-i-use-wp30-with-multisite-function-running-from-a-subdirectory

    “Error establishing a database connection” means the sub sites can;t connect to the database, which is dumb, as they use the exact same settings as the main blog. It’s not you, it’s your host. 😉

    I am having this same error. I can tell you, it is not the host as I host with Hostgator and I have other MU sites working just fine.

    I have the wildcard added to the subdomains in cpanel and point it to the root directory that wordpress is served from.

    The main site works, all other sites created through the wordpress backend give success messages and I get emails, etc.

    I visit the subdomain and I get just the words “Error establishing a database connection”. I can’t seam to figure this out, I guess I’m gonna wipe it all clean and try again – nothing else I try seams to fix the issue.

    Anyone else have this issue, or a fix?

    I have the wildcard added to the subdomains in cpanel and point it to the root directory that wordpress is served from.

    And usually the wildcard record is pointed to the root of your webhosting account. So if you’ve got an add-on domain, they usually do NOT have wildcard subdomain records.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Subdomain install: Error establishing a database connection’ is closed to new replies.