I did transfer my wordpress on localhost to server by uploading my wordpress files and importing mysql
but after importing mysql I can’t find wp_user in phpmyadmin database and I can’t login to my wordpress panel from wp-admin
what I have to do now?
Well it depends:
If you still have the original database stored locally, check if the wp_users table exists in there. If yes, you probably haven’t exported this table. Just export it (by selecting the table, and then on export it only exports a single table) and import it on your server.
If you don’t have the original database anymore, you can simply create one by executing the following SQL commands:
And adding some indices for quicker processing
Then you’re able to insert your admin user by executing
(Queries copied from here.) Don’t forget to use your values.
* Note: that the first query uses MD5. MD5 is definitely not the best way of storing passwords. (See here for example). According to the WP Codex WordPress currently still supports logging in if a MD5 Hash is stored:
So if you’re doing this, please update your password afterwards using the WordPress interface to ensure your password isn’t stored as a MD5 hash.
And in the end you should check that your
wp-config.php
contains the right database host and credentials.You can export only the missing table(wp_user) and import it on your server.