• Resolved ejm

    (@llizard)


    After reading various pages on how to restore WP, blank pages, redirects to https and 404s, a lot of screaming, inability to access the admin area, more screaming, I finally managed to re-install the files and can now access the admin area.

    Unfortunately, when I re-installed the files, WP decided it was a brand new install. All of my posts and comments have disappeared.

    I’ve looked in phpMyAdmin and the database appears to be intact. There are no other databases.

    Any ideas on how I can get the database to merge with this re-install?

    -E Morris (URL is pointless as it is in maintenance mode)

    Please note that I only understand enough about coding to get myself in a lot of trouble.

Viewing 7 replies - 1 through 7 (of 7 total)
  • It sounds like you overwrote your wp-config.php files. If you have a backup I would restore your files and try again. Try downloading WordPress again and delete then replace your copies of everything except the wp-config.php file and the /wp-content/ directory with fresh copies from the download. This will effectively replace all of your core files without damaging your content and settings. Some uploaders tend to be unreliable when overwriting files, so don’t forget to delete the original files before replacing them.

    If you don’t have a backup, you can try manually editing the wp-config file with your database information.

    Thread Starter ejm

    (@llizard)

    Thank you for your reply, Ari.

    Rats! I had hoped that your solution would do the trick.

    You were right; I had indeed overwritten my wp-config file because I thought perhaps I had somehow messed it up when I suddenly couldn’t access the admin area (redirecting to https and not found)

    I just now uploaded a fresh wp-config with the correct settings, removed wp-admin, wp-includes and all root files except the restored wp-config file (from an earlier backup)

    I then re-uploaded the appropriate fresh 4.1.1 files and am once again seeing the welcome screen that invites me to start my WP blog.

    How on earth can I get the database (that appears to have everything intact) to match up with the blog. The thing that really surprises me is that there doesn’t seem to be a new virtually empty database in phpMyAdmin for this wordpress.

    Any ideas?

    -E Morris

    This may be a silly question, but did you make sure not to upload over the wp-config.php file again? Also, did you restore the wp-content folder when you restored the wp-config.php file? Make sure you have the correct version of both of these.

    Thread Starter ejm

    (@llizard)

    There are no silly questions, Ari. I wondered the same thing myself.

    But no. I just took a look at the files via CPanel’s file manager and everything is there (all contents of wp-content folder and all new files of wp-admin and wp-includes and necessary root files). The wp-config file appears to be correct.

    What really confuses me is that there is no trace at all of the newly formed entirely empty WP in the database area.

    Thread Starter ejm

    (@llizard)

    Excuse me for replying to myself. I have just looked again at the database and WHOA!!! I see that there is a brand new wordpress there in the same database. I had no idea that more than one wordpress could go into one database!

    Now that I know this is the case, I have deleted all the tables that were created. I am once again at the stage where if I go to the admin area, I’m being encouraged to start a completely new installation.

    Which is what I don’t want to do. How do I get this particular installation to link up to the previous one that is in the database?

    -E Morris, now running 4.0.1 (because I had just upgraded to 4.1.1 and so only have the 4.0.1 database as backup) This particular version has the iThemes Security Plugin running on it so the wp prefix for it has been changed in the database.

    edit: I have once again deleted everything except wp-content and wp-config and uploaded the lastest fresh version of WP (downloaded today from the WP website) I went to my admin area and was redirected to /wp-admin/install.php…. I’m having fits here. What am I doing incorrectly?

    Thread Starter ejm

    (@llizard)

    Once again, please excuse me for replying to myself.

    I’m pleased to report that I have FINALLY got things back again.

    Ari wrote:

    did you make sure not to upload over the wp-config.php file again?

    Ari, you were right to ask this question! After deleting, uploading, deleting, uploading and constantly running into the same problem of having WP invite me to install a new WP, the light finally dawned.

    I have a different prefix for wordpress tables in the database. The prefix is defined in wp-config. So, with my clean upload of wp-config I had neglected to change that prefix to match the prefixes in my database. Duh….

    This is what I had to change $table_prefix = ‘wp_’; to

    $table_prefix = 'mycustomizedprefix_';

    and hey, presto! The wordpress database is once again attached to my wordpress.

    Thank you again for your patient answers, Ari.

    Ari Winokur

    (@ariwinokur)

    I’m glad you spotted that custom prefix and adjusted it. Enjoy tinkering in the future and always remember to have a recent backup!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘database refusing to connect to re-install’ is closed to new replies.