[wp-hackers] best way to reset the database

Daniel Fenn danielx386 at gmail.com
Wed Apr 4 03:33:00 UTC 2012


One way you could handle this is by installing workpress, set up all
the settings that you need and just backup the table and restore it.

You should be able to write a php script to delete and restore the database.







On Wed, Apr 4, 2012 at 1:29 PM, Haluk Karamete <halukkaramete at gmail.com> wrote:
> I'm working with a fresh install programmatically.
>
> I create taxonomies, terms, posts, on the fly without the dashboard. It's a
> process for me with lots of trials and errors.
> Many times, I want to start with a fresh slate.
>
> That's where the question is formed. What's the most effective way to bring
> the wp to the starting ( well, almost starting ) phase, programmatically?
>
> If I drop the database with a mysql statement, wp would create the tables
> and that would give me a fresh slate but that would also blow the bloginfo
> and admin user etc.
>
> All I care is to clean the wp_post, post_meta, where terms and taxonomies
> stored. no need to clean the options table.
> If I delete the records, that does not help cause then my IDs won't start
> from 0.
>
> What's a good way to handle this?
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers


More information about the wp-hackers mailing list