• Hi guys,

    First time here as I’m in need of some rescue help.

    Several months ago, the admin management access (CPANEL) I had to my hosted site was changed due to some attacks as I was told. A few weeks later, the nameservers of my site were updated and I did update that on the domain admin site (different provider).

    Somewhere along these events my WordPress site stopped working and the public page returned an “Error establishing a database connection”. The direct link to the wordpress admin page also returned the same error.

    I tried to play with CPANEL and restore wordpress with no luck.
    All I managed to do was to make a backup of the data via CPANEL.

    What do I want? Best scenario would be to restore the site as is of the last time it was on. It that it’s not possible I would like to retrieve the contents of site so I can manually recreate the posts.
    Any help is truly appreciated and I available to give access to anyone who wants to try to fix the site or retrieve the content.

    The site does not contain sensible information; it’s just about a planned big trip across Africa and some regional ride reports. As you can understand for me and my girlfriend it’s important as we developed an emotional connection with it.

    Many thanks in advance!

    goafrica

Viewing 11 replies - 1 through 11 (of 11 total)
  • I am hosting WP on a dedicated Winserver 2003. One of the instances no longer comes up. There was an issue with the DOM that is now resolved. I have the Plesk Panal v 10.4 There seems to be something corrupted in several of the .php files that control the site load.

    The glitch is with WP 3.9

    So, can I:
    1) remove the app using the Panel?
    2) re-install from the Panel with whatever version it gives me?
    3) rename the old DB to the new instance the re-install will create?

    Thread Starter goafrica

    (@goafrica)

    Hi ermphd
    I won’t be able to help, so I would recommend you to open a new thread for your issue.

    good luck
    goafrica

    Hi goafrica,

    You say you made a copy of your data via the cPanel. Is this a database export? Or did you just download your files?

    Now, on to the database connection problem. There are several steps you should take for diagnosing:

    1. Go to your wordpress directory. Download a copy of the wp-config.php file.
    2. Open the file with a code-editor like Sublime 2(you can download a free trial).
    3. In that file, look at the following lines:
    4. define('DB_NAME', 'something_here');
      
      /** MySQL database username */
      define('DB_USER', 'something_here');
      
      /** MySQL database password */
      define('DB_PASSWORD', 'something_here');
      
      /** MySQL hostname */
      define('DB_HOST', 'something_here');
    5. Now go back to your cPanel. Find and click on a link to phpMyAdmin (if you have cpanel maybe it looks like in this image: https://www.artofblog.com/wp-content/uploads/2010/03/cpanel-fantastico.jpg)
    6. Once you’re in, check that a database with the name in the DB_NAME line exists
    7. If the database exists, open it and check that the prefix of the tables in it matches $table_prefix = ‘something_’; in your wp-config.php
    8. Also try and see what the users associated with the database are and if the username matches what’s in your wp-config.php in the DB_USER line. This would probably be easier to look at from the MySql Databases interface in your cPanel.

    Other than these, it could be a change of password for the user, or a change for the DB_HOST that prevents WordPress from connecting, or the absence of your database. Or a corrupted database.

    But first things, first… Do the above and let us know what’s going on. Don’t give out any sensitive info like those in your wp-config file in your reply.

    Good luck,
    Anca

    Thread Starter goafrica

    (@goafrica)

    Hi Anca,

    I think I have a bigger problem that I didn’t describe before.
    At one moment in time I tried to restore to a new worpress site via Cpanel. I kept a backup copy of the site (a tar file).

    So now I can check your points 5-6-7 and they’re ok but the db it’s not the same.

    Any advice? Would you like to have a look at the file to see if the old db is there?

    Many thanks
    goafrica

    Thread Starter goafrica

    (@goafrica)

    Hi,
    I can have a look, sure. Email me at [ redacted, please do not post emails here ].

    You’ll get a wetransfer email with the link to download the file.
    Thanks,
    goafrica

    Hi, got it, sent you a reply.

    @goafrica and @AncalO, do not share emails on here as you are only to give support right here on the forums!

    Well, in this case, there was no support to give because the database or the posts in it were removed completely and there’s no backup of the sql file.

    We needed to verify that on an actual, live cPanel and we couldn’t exchange that kind of information on a public forum. I’m afraid there was no other way. And since there is no solution to share, no one benefits from this info…

    Sorry if we broke any rules :/

    PS: If there’s any knowledge to take from this it’s that regular backups of files and databases are lifesavers. Oh yeah, and don’t count on your hosting service for backups.

    @AncalO, you just need to do your best in giving support here on the forums. Screenshots provided as links can be helpful.

    By the way, goafrica, you should also talk to your hosting provider on this issue.

    @respectyoda: Sure. No harm was intended in this, to the contrary. It’s one of those nightmare situations, really, no matter what kind of website or blog it is, it’s a shame to lose the content.

    Basically goafrica has file backups but did not have a database backup, at least not one from before the loss of posts. In such situations, without some old sql dump from before the troubles, or some WP posts export file lost somewhere on the hard drive there’s little to do about it, other than talking to the host.

    From what I understood, the host did not have their own backup of goafrica’s DB. What a bummer!

    @AncalO, yeah, I completely understand, but we have to abide by the rules, you know.

    Some hosts do not make backups of the database and files without first having the customer allow them to incur a cost for this operation. This is a hard lesson for many novice WordPress users.

    So, @goafrica, next time, I suggest you to use a plugin as such as iThemes Security which can and will make periodical database backups for you.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘website is down’ is closed to new replies.