WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Newly converted multisite subdomains can't connect to database (27 posts)

  1. newmediaavenues
    Member
    Posted 3 years ago #

    Godaddy virtual dedicated server.
    Plesk

    Newly created blogs are showing up in the database in phpadmin but I'm getting "Error establishing a database connection" when I attempt to view them. The main blog works fine.

    I have DNS configured with wildcard subdomains but with Plesk, this isn't all that clear. Also, Godaddy will not allow an * in their Cname configuration of their own name servers.

    Currently, if I type anything at all such as fakeword.domain.com, it comes back with "Error establishing a database connection" so I'm thinking maybe it's a vhosts.conf issue or some other wildcard problem.

  2. newmediaavenues
    Member
    Posted 3 years ago #

    Yes, I referred to that page as my resource for installation.

    I'm willing to pay someone with WP multisite experience to dig around at this point. Any resources where I might find this individual?

  3. newmediaavenues
    Member
    Posted 3 years ago #

    Another detail to the clues, when creating a new blog, while the entries are showing up in the database, nothing is showing up in blogs.dir. Should there be something in there for each entry?

  4. No, blogs.dir fills in when you upload images.

    Currently, if I type anything at all such as fakeword.domain.com, it comes back with "Error establishing a database connection" so I'm thinking maybe it's a vhosts.conf issue or some other wildcard problem.

    Oddly no. That means that WP is 'catching' all the subdomains (that is you're correctly sending anything.domain.com to domain.com's WP install) so that's okay.

    Did you by chance move your install from a subfolder AFTER making it multisite?

  5. newmediaavenues
    Member
    Posted 3 years ago #

    Nope, it's in the top level and always has been. It is, however, under a "webspace" of another domain. This is something I've never dealt with since I've never dealt with Plesk before.

    There is a little complicated background. The site was first on a shared hosting at Godaddy. I set up multisite assuming I could employ the wildcard dns and found out I couldn't so I got a virtual dedicated so I could control that. So I downgraded the WP installation back to regular WP and moved it, importing the old database into the new one. Got it up and running and then upgraded back to multisite.

    I also had an issue with the version of mysql not being sufficient for the latest WP so I upgraded that. Now I get the "Your PHP MySQL library version 5.0.90 differs from your MySQL server version 5.1.58. This may cause unpredictable behavior."

    I've read that this shouldn't be an issue, but I'm willing to entertain any and all potential causes up to and including gremlins and angry unicorns.

  6. newmediaavenues
    Member
    Posted 3 years ago #

    Additional info:

    I created the blogs test1, test2, test3 with same results. The were put in the database but when going to subdomain I get the can't connect error. Then deleted them from the WP Network Admin and they were removed from the database. So WP can connect and modify the database.

  7. It is, however, under a "webspace" of another domain.

    I don't think that's a problem, but my plesk experience is minimal :/

  8. The can;t connect error means the db tables were not created.

    I created the blogs test1, test2, test3 with same results. The were put in the database but when going to subdomain I get the can't connect error.

    How many wp_posts tables are there? DO you get wp_3_posts, wp_4_posts etc...?

  9. newmediaavenues
    Member
    Posted 3 years ago #

    This may be an issue:

    * You can have multiple installations in one database if you give each a unique
    * prefix. Only numbers, letters, and underscores please!
    */
    $table_prefix = 'wp_1';

    I set up the database as wp_1 at first because I wasn't clear on this.

    So now with all the adding and removing test blogs, I currently have wp_19, wp_110, wp_111, wp_112 and wp_113.

    When I look at wp_113_posts there are 2 entries, the welcome and the sample post for those blogs.

  10. $table_prefix = 'wp_1';

    I set up the database as wp_1 at first because I wasn't clear on this.

    and that particular extension will screw up multisite, because that's one way it checks for "is this an upgraded wordpress mu site?"

    can you have a do-over? or change the prefix?

  11. newmediaavenues
    Member
    Posted 3 years ago #

    Um, good question. I'd rather not do a total do-over. Can I just duplicate the database, alter it or?

    How might you go about it if it was your problem? :)

  12. I'd do a dump of the db, change the table names, change it prefix in the confgi file, then plop my altered sql back in a new empty db, adjust the config file to point to the new one and there ya go.

    FYI that table prefix comment was not relating to multisite at all. (Hmm, maybe I should file a ticket on that...)

  13. newmediaavenues
    Member
    Posted 3 years ago #

    Okay, I did all that now and all and I created a new blog called newdb.mysite.com and it wrote to the new DB where everything else is. The new table is wp_13.

    Still getting the same "Error establishing a database connection"

  14. newmediaavenues
    Member
    Posted 3 years ago #

    If it is creating the new tables with no problem, that means wp can connect to the db, correct?
    So it has something to do with the subdomain not being able to call up the table that was created. Is this also correct?

    If I type sub.domain.com/wp-admin/ I get the WP dished error page.
    If I type subANYTHING.domain.com/wp-admin/ I still get the WP dished error page.
    If I type sub.domain.com or ANYYTHING.domain.com I get the regular server error in bold black that must be dished from the database server.

  15. or ANYYTHING.domain.com I get the regular server error in bold black that must be dished from the database server.

    Okay THIS is helpful. If you type anything.domain.com and the install is working correctly, you should just be redirected to the signup page.

  16. newmediaavenues
    Member
    Posted 3 years ago #

    PROGRESS!

    Not helpful to me, however.

    Are you thinking it is a DNS issue or a WP issue?

  17. Server issues. or db issues (which we kinda went over).

    Can you (I know) ask GD support to help you set up the wildcard subdomain properly?

  18. newmediaavenues
    Member
    Posted 3 years ago #

    Godaddy says they cannot help me.

    "Server Concierge: Please note that your request falls outside our realm of support, as the virtual dedicated/dedicated server in your account is currently on our unmanaged support policy. These servers are sold with the understanding that the client will be able to administer their own server, which includes configuration of security and applications of the server. If you do not have server administration experience, it is strongly recommended that you hire a server administrator or purchase an assisted service plan. You can view our current support policy at the link listed below:"

    Of course, I purchased this virtual dedicated server on Godaddy's suggestion when I told them I needed to get Multisite working. If it is a Plesk issue, they should have suggested another configuration.

  19. newmediaavenues
    Member
    Posted 3 years ago #

    More details from exploring:

    For my "webspace" I have two websites. The first one (not the one I'm trying to get multisite working on) resides in /httpdocs and the one I'm trying to get multisite resides in /MYDOMAINNAME.COM and is in all upper case.

    The first one is a WP site that I have yet to actually begin working on.
    Now I've realized that if I try to visit that site at http://www.firstsite.com it goes to firstsite.com domain (removes www) and then comes up with "Error establishing a database connection" - My guess is that with the wildcard configuration I have set up, it is confusing even that site.

    In the directory that houses these two directories, there is the conf folder where I have a vhosts.conf file that says:

    ServerAlias *.mydomain.com (with my real domain, of course)
    it is a single line and there is no "." after mydomain.com

  20. newmediaavenues
    Member
    Posted 3 years ago #

    Now I tried deleting the vhosts.conf file then rebooting apache and same problem.
    Then I moved the vhosts.conf file into the website's own conf directory. Same problem.

    It seems to just not want to take direction at all from the vhosts.conf file no matter where it goes.

    I'm thinking there is another directory it needs to be in due to the "web spaces" situation under Plesk.

  21. newmediaavenues
    Member
    Posted 3 years ago #

    I just called Godaddy and had them set me up another server with CPanel... ugh.

    Any advice on moving a multisite?

  22. esmi
    Forum Moderator
    Posted 3 years ago #

    Have you reviewed Moving_WordPress_Multisite?

  23. newmediaavenues
    Member
    Posted 3 years ago #

    Yes, esmi, I have... not a lot of detail there but after everything else I've had to do, it will probably be easy.

  24. Since you're just picking it up and moving it, you should be okay :) The moving hassle comes if you're trying to move from a subfolder to root.

  25. newmediaavenues
    Member
    Posted 3 years ago #

    Setup of WP Multisite and move went smoothly with CPanel. I'm not a huge fan of CPanel, give me old school any day but at least setting up wildcard subdomains, etc. went as it should.

    Plesk sucks!

    In the future, when you see anyone posting about this problem with Plesk, just tell them to stop right now and go with CPanel or any other option!

  26. In Plesk's defense... it's really powerful. But yeah, it's like using a backwards stone to do 'simple' things.

Topic Closed

This topic has been closed to new replies.

About this Topic