Title: Resetting SQL
Last modified: August 18, 2016

---

# Resetting SQL

 *  Resolved [pigmoose](https://wordpress.org/support/users/pigmoose/)
 * (@pigmoose)
 * [19 years, 7 months ago](https://wordpress.org/support/topic/resetting-sql/)
 * last week I put wordpress into a folder (my url/wordpress) off my www folder.
 * Then after testing it running from there I was delighted with how it was performing,
   so I shifted it to my www folder but of course the database was still pionting
   to the old folder (my url/wordpress).
 * So I tryed clearing the database and reinstalling wordpress this failing to create
   new tables. I tryed puting the original folder back which did create tables but
   that didn’t quite work.
 * What should I do to start from stratch?

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [MichaelH](https://wordpress.org/support/users/michaelh/)
 * (@michaelh)
 * [19 years, 7 months ago](https://wordpress.org/support/topic/resetting-sql/#post-466217)
 * Delete any wordpress files and folders, drop the database tables, then start 
   over.
 * Assuming you used wp_ for your $table_prefix here’s the DROP commands to use 
   in [phpMyAdmin](http://codex.wordpress.org/phpMyAdmin)
    ` DROP TABLE wp_categories;
   DROP TABLE wp_comments; DROP TABLE wp_linkcategories; DROP TABLE wp_links; DROP
   TABLE wp_options; DROP TABLE wp_post2cat; DROP TABLE wp_postmeta; DROP TABLE 
   wp_posts; DROP TABLE wp_usermeta; DROP TABLE wp_users;
 *  Thread Starter [pigmoose](https://wordpress.org/support/users/pigmoose/)
 * (@pigmoose)
 * [19 years, 7 months ago](https://wordpress.org/support/topic/resetting-sql/#post-466220)
 * Thanks for the help MichaelH. Before I got your post I went into phpMyAdmin and
   dropped all the tables by simply clicking the drop icon (perhaps I shouldn’t 
   have done that) then I totally deleted all the files in my www folder and started
   again. Now I keep getting the `ul`Error establishing a database connection`/ul`
   message. Have I destroyed my SQL?
 *  [MichaelH](https://wordpress.org/support/users/michaelh/)
 * (@michaelh)
 * [19 years, 7 months ago](https://wordpress.org/support/topic/resetting-sql/#post-466221)
 * I believe I’ve seen somewhere that dropping the last table ended up also deleting
   the database.
 * If the database still shows in phpMyAdmin then remember you may need to set the
   correct values in your `wp-config.php` file.
 * If the database doesn’t showup in phpMyAdmin then recreate the database.
 * Additional info:
    [Installing_WordPress#Step_2:_Create_the_Database_and_a_User](http://codex.wordpress.org/Installing_WordPress#Step_2:_Create_the_Database_and_a_User)
 *  Thread Starter [pigmoose](https://wordpress.org/support/users/pigmoose/)
 * (@pigmoose)
 * [19 years, 7 months ago](https://wordpress.org/support/topic/resetting-sql/#post-466222)
 * I think it must be the first one as I have check the wp-confing.php file so many
   times it’s not funny. I have emailed the host to ask if they can return my database
   to a blank slate so I geuss I will wait and hope. cheers

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Resetting SQL’ is closed to new replies.

## Tags

 * [moving](https://wordpress.org/support/topic-tag/moving/)
 * [Resetting](https://wordpress.org/support/topic-tag/resetting/)
 * [sql](https://wordpress.org/support/topic-tag/sql/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 2 participants
 * Last reply from: [pigmoose](https://wordpress.org/support/users/pigmoose/)
 * Last activity: [19 years, 7 months ago](https://wordpress.org/support/topic/resetting-sql/#post-466222)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
