0

I'm working on localhost doing some pages with wordpress. Yesterday I've finished to work with some pages, and then I turn off my pc. Today when I turned it on and I've tried to reach some pages (after have turned theApache and Mysql services on) wordpress say i need to install the framework again.

This is the 1st error i get: error

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 scratch with the webpages.

ozkanpakdil
  • 3,199
  • 31
  • 48

2 Answers2

0

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

Johannes
  • 64,305
  • 18
  • 73
  • 130
  • You mean i need to put the db name db password and db user what i set for it ? In my wp-config.php i have define( 'DB_NAME', 'olivosdearagon' ); /** Database username */ define( 'DB_USER', 'root' ); /** Database password */ define( 'DB_PASSWORD', '' ); /** Database hostname */ define( 'DB_HOST', 'localhost' ); /** Database charset to use in creating database tables. */ define( 'DB_CHARSET', 'utf8mb4' ); /** The database collate type. Don't change this if in doubt. */ define( 'DB_COLLATE', '' ); – albert9871 Sep 06 '22 at 10:08
  • yes, that's what I mean – Johannes Sep 06 '22 at 10:09
  • Okay i did it but still not working. I tried to reach from localhost/phpmyadmin my database and when i try to open wp users it says : #1932 - Table 'mynametable.wp_users' doesn't exist in engine – albert9871 Sep 06 '22 at 10:12
  • @albert9871 does it may be useful to solve [source](https://wordpress.org/support/topic/my-website-keeps-going-back-to-wordpress-installation/) ? – Zenek Sep 06 '22 at 10:38
  • Have a look here, maybe it helps: https://stackoverflow.com/questions/33839569/mysql-error-1932-table-phpmyadmin-pma-user-config-doesnt-exist-in-engine – Johannes Sep 06 '22 at 11:24
-1

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

Zenek
  • 60
  • 2
  • 12
  • Please share more details. How does this ensure that the installer is not shown again? – Nico Haase Sep 06 '22 at 10:05
  • I've updated the answer to explain better the procedure. By the way, by the logs shared with us we can cleary say that the problem is currently with the `wp_users` and `wp_usermeta` table which already seems to exist in the DB. And that obvious since the installation has already be made. The owner of the question says the problem is when he try to reach (with localhost) the database direclty, so i didn't link the problem at the installation process but at a direct access at the DB itself: *"...the surprise is when I try to reach localhost/"my database name..."* – Zenek Sep 06 '22 at 10:13
  • I would assume that the sole problem is that WP redirects to the installer instead of showing the application itself. And obviously, such errors are thrown if the installer is run a second time – Nico Haase Sep 06 '22 at 10:14
  • @NicoHaase There is no point to try to directly reach the DB. If he want to reach the application is just necessary reach the *localhost* itself (or the subpath). If you are try to access at the DB and you face errors, i just provided the solution at the question shown. – Zenek Sep 06 '22 at 10:17
  • Hi, i work xampp with multisite and i have the same problem with all pages. When i try to open from localhost/"mypagename" it says i need to install wordpress and its says the users already exists ( i don´t want to install again wordpress obviously) well after that i got the next error WordPress Database Error: [Table 'wp_users' already exists] and more and second line error its WordPress Database Error: [Table 'olivosdearagon.wp_options' doesn't exist in engine] – albert9871 Sep 06 '22 at 10:18
  • You now write that you try to reach the `localhost/"mypagename"` but in the original question you wrote `localhost/"mydatabasename"`. My answer was of course linked at this point, but is totally wrong if we talk about "mypagename". The problem is now cleary linked at the installation process and not at the database error. Be more careful when write a question, or other people receive downvote for something answer correctly :/ – Zenek Sep 06 '22 at 10:22
  • Sorry i´ll try to explain better – albert9871 Sep 06 '22 at 10:26