Skip to:

Re: Accidently emptied the wp_users table

Jeff Sayre


There’s not too much you can do–unless you made a backup of your MySQL DB before messing with it in the backend.

You should always make a backup of your DB before you do anything to it that may result in changes to the data or the data schema. In fact, make a backup of your DB at the end of each coding day just incase the unexpected happens.

I assume that you did zero customizations to the data schema of your MySQL DB. If so, then just delete your current DB and then create a new one with the exact same username and password. But, if you do this, you’ll need to reinstall BuddyPress so that BP’s tables get created in the DB. You will also have to reenter any test data, but it should get you back up an running.

Also, I’m not sure why this is an issue:

I’ve customized so much code on the back end that reinstalling buddypress would be a huge pain.

Do you mean that you have hacked the core or WPMU and / or BuddyPress? If so, you should stop doing that as every time BuddyPress is updated, your hacks will be lost.

Instead of hacking the core BP files, either create your own custom plugin(s) to hold your code, or use the bp-custom.php file. That way, if and when you need to delete your install and start from scratch, you can easily do so. Just make sure you have back ups of any custom theme files, a listing of all your plugins, a copy of your bp-custom.php file, and a copy of your wp-config.php file assuming that you want to use the same MySQL DB.

Skip to toolbar