<p>If you're specifically looking to trim the <code>entryversions</code> table, there is a <a href="https://craftcms.stackexchange.com/a/10675/57">plugin</a> that can automate the process for you.</p>

<p>Beyond that, you can safely truncate these tables as well when moving between environments:</p>

<pre><code>assetindexdata
assettransformindex
sessions
templatecaches
templatecachecriteria
templatecacheelements 
</code></pre>

CC BY-SA 3.0
2017-02-15T19:23:10.020Z
2017-02-15T19:23:10.020Z
2017-04-13T12:51:00.200Z
Brad Bell
<p>I would like to reduce the size of a site's database. The reasons are as follows:</p>

<ul>
<li>To speed up the syncing process from live to local</li>
<li>To hopefully speed up sql query execution time (an experiment)</li>
</ul>

<p>I have many sections and hundreds upon hundreds of entries, all with versioning enabled. My question is, is there a way to 'trim the fat', or to put it better perhaps remove stale old version types (perhaps just keep the 5 most revisions for each entry)?</p>

<p>Thanks in advance for you help! </p>

<database><entry-versions>
Reduce Database size
# Reduce Database size

(Asked by: username_0 on 2017-02-15)

I would like to reduce the size of a site's database. The reasons are as follows:

* To speed up the syncing process from live to local
* To hopefully speed up sql query execution time (an experiment)

I have many sections and hundreds upon hundreds of entries, all with versioning enabled. My question is, is there a way to 'trim the fat', or to put it better perhaps remove stale old version types (perhaps just keep the 5 most revisions for each entry)?

Thanks in advance for you help!

**Tags:** database, entry-versions

---

## 1 answers

### Answer by username_1 on 2017-02-15. Score: 2 | Accepted answer

If you're specifically looking to trim the entryversions table, there is a plugin that can automate the process for you.
Beyond that, you can safely truncate these tables as well when moving between environments:
assetindexdata
assettransformindex
sessions
templatecaches
templatecachecriteria
templatecacheelements


---

