Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

WordPress

William Whatley
William Whatley
5,452 Points

Wordpress Migration from Live to Local using XAMPP "table prefix error."

Hello All!

Using the Duplicator plugin, I extracted files from a live site and pasted them, and the "installer.php" file in the "htdocs" section of the Wordpress folder.

I created the database in phpmyadmin, and then proceeded to the installer screen, where I entered the correct database details and so forth.

Everything seemed to check out until I tried logging in to complete the install-- from there it redirects me to an error code saying:

"Your wp-config.php file has an empty database table prefix, which is not supported."

I've tried several different sources to try and fix this error and am having no luck.

Please help!!

Have you imported the database tables from the XAMPP database? If so, are your database versions both up to date?

If you are still getting this after importing all wp_ tables, then you could try using compatibility mode for phpMyAdmin (e.g. MYSQL40) and that should do the trick. I have seen a few cases where the unique key is missing for each entry, thus causing all the data to effectively be read-only.

Finally, you should also check to see if the installer has correctly modified the wp-config.php file. This one is pretty easy to check, even if you're not familiar with the layout, as you only need to verify if the database name, user, and password match. Localhost should be fine for the host name.

Hope one of those helps! Best of luck.