Support » Fixing WordPress » Can’t connect to a previous SQL

  • Hi there.

    My dad has unfortunately been subjected to a major sever attack, that we have had to delete (via FTP) the entire WP 🙁

    However, I have made a back-up of all the pictures. After all, texts are in the database.

    Now I have installed a brand new and fresh WP, and connected it to the same database to which the previous installation was connected.

    How do I get all the text pages and blog posts into the new installation?

    I have tried to change the database name in config.php, without succes.
    I have tried this’n’that plugin, without succes.

    • This topic was modified 4 years, 1 month ago by JeanJensenDK.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi, JeanJensenDK, & welcome. If you’ve connected to the same database via wp-config.php, & the domain name is still the same, that is all you really need to do. You should, however, change your control panel, dashboard, & database passwords. Also, when you installed WordPress, did you run the installer & use the existing database? If so, & if your table names were the same, ie, wp_, there is a chance you just wrote over the previous contents. You may wish to look at the database. It could be there are 2 installs present, 1 w/the previous contents & 1 w/the new install. But if you didn’t back up your database prior to installing the new 1 & used it to install WordPress w/the same table names, you really may have overwritten the existing site. Sorry to be the bearer of bad tidings on that, but…

    Have you examined the database to ensure it isn’t hacked also? Yet another reason to have a close look.

    Lastly, a site url may (or may not) prove helpful, depending on the particular case, & it’s always appreciated by the forum volunteers when folks provide 1. In this case, it would’ve at least let us know if a successful database connection can be established.

    Thread Starter JeanJensenDK


    Hi Jackie.

    Thank you very much for your reply – and spending time helping me!

    I’ve downloaded the database [palle_dkposts.sql], and checked that all entry is as they should be.

    In my, I can see the database that contains all blogs and pages: palle_dkposts. I guess that the database name is as is, since I set prefix to pallet_dk in the initial installation (the site that has been deleted)?
    When I set “$ table_prefix = ‘palle_dk’;” in my new wp-config.php, the site crashes.

    I have tried to export the database “palle_dkposts” and then import it to a new database and then change the prefix in wp-config.php, but already on importing the database, it reports an error due to duplicate content – despite no duplicates found …

    If I delete ALL databases but the one with the content, and then set the prefix in wp-config.php to palle_dkposts – will this work, or just f*** it all up?


Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Can’t connect to a previous SQL’ is closed to new replies.