Home > front end >  Already installed WordPress instance triggers installer
Already installed WordPress instance triggers installer

Time:09-07

I work on localhost doing some pages. Yesterday I just finished some work on the pages then I turn off my pc and today when I turn it on I open xampp I start Apache and Mysql and the surprise is when I try to reach localhost/"my database name" and it says I need to install wordpress again.

This is the 1st error i get : https://i.stack.imgur.com/O472M.png

Well I just put the same name etc etc... and the next error is this :

WordPress database error: [Table 'wp_users' already exists]
CREATE TABLE wp_users ( ID bigint(20) unsigned NOT NULL auto_increment, user_login varchar(60) NOT NULL default '', user_pass varchar(255) NOT NULL default '', user_nicename varchar(50) NOT NULL default '', user_email varchar(100) NOT NULL default '', user_url varchar(100) NOT NULL default '', user_registered datetime NOT NULL default '0000-00-00 00:00:00', user_activation_key varchar(255) NOT NULL default '', user_status int(11) NOT NULL default '0', display_name varchar(250) NOT NULL default '', PRIMARY KEY (ID), KEY user_login_key (user_login), KEY user_nicename (user_nicename), KEY user_email (user_email) ) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci

WordPress database error: [Table 'wp_usermeta' already exists]
CREATE TABLE wp_usermeta ( umeta_id bigint(20) unsigned NOT NULL auto_increment, user_id bigint(20) unsigned NOT NULL default '0', meta_key varchar(255) default NULL, meta_value longtext, PRIMARY KEY (umeta_id), KEY user_id (user_id), KEY meta_key (meta_key(191)) ) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci

I tried everything and I can't solve the problem. what can I do? I don´t want to start from the beginning with the webpages.

CodePudding user response:

If the database already exists, most likely you have not edited the wp-config.php yet (using any text editor), where you have to insert your database data, like server, db name, db password, db user.

Here are some more details about this: https://wordpress.org/support/article/how-to-install-wordpress/#step-3-set-up-wp-config-php

CodePudding user response:

Seems you are trying to CREATE tables in the DB which already exist, if you need the users already present on db, my suggestion is to manually backup the table (by dumping its), remove its (after the dump), and then re-insert them.

You can easly do that (directly on xampp) by using the PHPMYADMIN panel:

    1. Open XAMPP Control Panel
    1. Start Apache and Mysql Services and go to http://localhost/phpmyadmin/
    1. Here you should be able to find the WordPress Database (in the menù at the left), open it and look for the table citizen by the logs.
    1. export all of them (you should find the export button in the navigation bar upside)
    1. Delete the table after exported.

Now the CREATE command should works fine. You can re-import the table exported at the point 3 after this procedure

  • Related