0

I'm having trouble trying to setup WordPress for local development, I tried to install it, but even though I fill up the form to setup config file I still get the same error, I can connect to database, but I don't know why it keeps giving that error.

I also tried using the wp-config-sample.php but when opening index.php it says Error Database Connection.

  • What's the value of $table_prefix in your wp-config.php file? – birgire Mar 13 '16 at 8:47
  • If using a windows pc, make sure the wp directory has permissions. aka give IUSR permissions to write. – Dawesi Apr 15 '18 at 16:49
1

You need to have the table prefix set in the wp-config.php file. It must be matching the same value in tables of your database, the default value is "wp_" but if you used a customized value for your tables to enhance security which is a good practice, you need to update your $table_prefix = 'wp_'; where you would change the 'wp_' to the value of your tables.

  • It is like that, Idk why it doesn't work properly... – Jonathan Solorzano Mar 13 '16 at 0:09
  • Are the WP tables created in the database? – Motaz M. El Shazly Mar 13 '16 at 0:30
  • I already solved the problem, but still don't understand it, when using MAMP's MySQL, and PhpStorm's built-in server it didn't worked, but when using MAMP's apache server it did work, not sure if MAMP is encapsulating MySQL instance – Jonathan Solorzano Mar 13 '16 at 2:18
0

Hello Please check this article to solve above error - https://www.thetechtrackers.com/2019/06/table-prefix-must-not-be-empty.html and let me know your thoughts.

  • 1
    Welcome to WPSE. This isn't what would generally be a high quality answer since you're simply directing to a link. A good WPSE answer has some explanation in which links to outside references are OK, but shouldn't be the entire answer. – butlerblog Jun 8 at 11:08
-1

this might help someone in the future, but in my case changing PHP version to 7.1.7 (in IIS) fixed it

  • You're likely getting down-voted because this answer seems to be off topic and/or lacking in detail. It's unusual to run IIS locally and this question is about local dev environments; it's also not clear how version 7.1.7 of PHP would resolve the issue. It would be helpful if you provided more context to you're answer. For example: where you experiencing the same problem? Was changing the PHP version the actually the solution for you? If so, any idea why that may be? – DaveLak Jul 3 '18 at 22:11
-1

Hi :) Remove mod_security under iis manager -> site -> modules (at least while installing wordpress)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.