Deleting All Entries from a Movable Type Blog... In One Go!

| 4 Comments | No TrackBacks |
When working on the development version of an existing, large Movable Type blog with hundreds or thousands of entries, it can sometimes be useful to 'empty out' the blog.  Say you want to test some tweaks to your archive templates, but you don't want to be republishing five years worth of entries after every little change.  So you go to the 'Manage Entries' screen and...
... you notice you can only see 25 entries at a time, 200 if you hit the 'Display Options' link in the top right corner.  Clicking the top checkbox in the table and then 'Delete' is not that much work if you have a blog with less than 200 entries, but what if you have several thousand entries you want to flush to the bit bucket in the sky?

delete.png

It would be really nice if Movable Type would have a special 'Select All' button or link in screens like these, but unfortunately there is no such thing at the moment.

But!

If you go to the 'Search Entries' screen, and select '.*' as your search term, along with the 'Regex Match' option, all entries will be returned in the search results.  By default Movable Type will only show the first 125 results, but there is a link here ('Show all matches') that you can click to get the full list, no matter how long it is...

searchdelete1.png

After clicking:

searchdelete.png

And in this list you can now click the first checkbox and then the 'Delete' button, and all entries will be gone from your blog!

NOTE: make sure to use the latest version of MT 4 or 5 before you try this.  Some earlier versions of MT had a bug which made it impossible to display all results for a search and on those versions this tip won't work...

No TrackBacks

TrackBack URL: https://www.movabletips.com/cgi-bin/mt/mt-tb.cgi/30

4 Comments

You could also change the display options directly. Edit in your mt-installation tmpl/cms/include/display_options.tmpl and change this line from:
selected="selected">

to any number you like:
selected="selected">

Now it displays 10000 entries/blogs/whatever! You can also add new lines like this with any amount to show even more display options.


In addition to my previous comment where the html was cut, here is this line again without the html tags:
option value="10000" mt:if name="LIMIT_10000" selected="selected" /mt:if __trans phrase="[quant,_1,row,rows]" params="10000" /option

Your way of telling the whole thing in this paragraph is really nice, all can without difficulty understand it,
Thanks a lot.

Your way of telling the whole thing in this paragraph is really nice, all can without difficulty understand it,
Thanks a lot.

Leave a comment


Movable Type Help?

"Can my Movable Type issue or project be taken care of by a professional?" Yes It Can Be! Contact YesItCan.be
Powered by Movable Type 5.2.7