[Solved 2020] “Table Prefix” must not be empty - WordPress Error | The Tech Trackers

[Solved 2020] “Table Prefix” must not be empty - WordPress Error

Table Prefix” must not be empty

Hello Guys, you are here because you were installing WordPress via clean install method and on the 2nd step of the installation, you found an error that “Table Prefix” must not be empty”.

This is Rahul from The Tech Trackers and I encountered same error while installing WordPress for my client and I googled so much but didn’t find any solution to above problem. So, I rolled up my sleeves and dive deep into it and now we got the solution to the above error. I would like to share that solution with you guys.

So, read and follow below mentioned steps and if you have any questions and queries let me know in the comments section below.

You must have received above error while filling your database details.

Table Prefix” must not be empty.

In a normal case when you fill database details in the above form and hit submit then WordPress fill those details in wp-config.php file but, here we are getting an error so now we going to do this process manually. For that after getting “Table Prefix” must not be empty Error you have to open c-panel and locate wp-config-sample.php file. 

Open the sample file in an editor and edit database details (database name, username and password) manually and hit save.

Table Prefix” must not be empty
Then close sample file and rename it to wp-config.php

Once done with the rename process again go to the WordPress install screen.

Table Prefix” must not be empty

This time, once you select language, then WordPress will redirect you to welcome screen.

Where you have to fill details like site title, username and password for WordPress etc. and hit install here after clicking on install button you will get below error “Please Provide valid username” and keep coming if you choose any username.

Now, we have to skip this step as well to do that, again we have to go to C-panel and locate install.php file under wp-admin folder, Open install.php file and search for your error “Please provide a valid username” and then you will see sections like below image.

Here we have to change $error = true; to $error = false; (This will disable validation for username field on above screen)

Now, again head toward welcome screen and hit install. This will install WordPress without any user it will look something like below image.

As you can see WordPress installed on your domain, but you can’t login because there is no user created so now you have to create a user from PhpMyAdmin and assign him administrator rights.

To do that, you have to Access PhpMyAdmin from your cpanel. In PhpMyAdmin locate your database in my case, it’s “testblog2

After choosing database, click on “wp_users” there you will see an empty table like below:
Here you have to create a new user by clicking on the insert button on top ribbon as below:

After clicking on insert button you will get below fields, where you have to fill details of users like username, password, email id etc. Leave id field blank because it will get generated automatically. And while entering a password change value of a function to MD5 .

Now you have created a user via PhpMyAdmin now you can login via above details but you can’t access the dashboard for that you have to assign administrator rights to created user. 

To check your user rights head to the “wp-usermeta” table in your database. This is the table where all Meta information of user gets stored. We have to modify this table to give admin rights to created user.

To simplify this process I have created an SQL file which you have import in your database but before that you have delete above “wp-usermeta” table by going into operations section.

Now you have to download this SQL from here and open in any editor and search for “database name” and change the database name to your database name in my case it’s “testblog2” and save it.

Next step is, go to your database in PhpMyAdmin and click on import, where you have to select a downloaded SQL file and hit go. It will automatically run queries and assign administrator rights to our user.

Now try logging in, this time you will be successfully redirected to the WordPress dashboard.

That’s it! You have successfully installed WordPress by skipping  “Table Prefix” must not be empty error.

If you like this article then share your thoughts in the comment section. I would love to hear from you guys.

Thank You.


  1. Hello,

    Thank you for this document so explicit but my side it does not work;
    when I change the name of the file, I am told that I need the sample file to continue and when I keep the 2 types of files, I am told that the file Conf.php already exists and if I want to continue it will be necessary that I delete it otherwise I am offered access to the installation page, and when I click nothing comes, not even an error message

    I am lost, I do not know what to do

    thank you in advance for your help

    1. Hello There,

      As I mentioned in above article first you have to locate "wp-config-sample.php" file and add database details in that file manually. once done with editing file save and then rename file to "wp-config.php". Once you renamed the file again start the installation process by choosing language. if need more help contact me via contact form I will guide you.

      Thank You,

  2. Replies
    1. Thank for your valuable feedback. Feel free to Share and subscribe to our newsletter.

  3. Thanks a lot.It really works. I have done my job.

    1. Thank for your valuable feedback. Feel free to Share and subscribe to our newsletter.

  4. IT didn't work on my localhost. Please what should I do?

  5. Please follow each step as mentioned above in proper sequence and it will work. If still not working feel free to reach us by filling the contact form.

  6. Hero! Thanks for your support.


© 2016 The Tech Tracker . Powered by Blogger.