# Wp\_pg\_files taking up a lot of space (3gb)

**URL:** <https://forum.pinegrow.com/t/wp-pg-files-taking-up-a-lot-of-space-3gb/9054>\
**Category:** General\
**Tags:** wordpress\
**Created:** [August 6, 2024, 3:38pm UTC](https://forum.pinegrow.com/t/wp-pg-files-taking-up-a-lot-of-space-3gb/9054 "2024-08-06T15:38:48Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![fakesamgregory](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/fakesamgregory/32/3903_2.png) [@fakesamgregory](https://forum.pinegrow.com/u/fakesamgregory)\
**Post date:** [August 6, 2024, 3:38pm UTC](https://forum.pinegrow.com/t/wp-pg-files-taking-up-a-lot-of-space-3gb/9054/1 "2024-08-06T15:38:48Z")

</div>

I have been using WP Pinegrow plugin for the last few weeks and somehow my `wp_pg_files` is taking up nearly 3gb!! I can’t save my projects currently.

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/pinegrow/original/2X/6/64b4e951d999016527823c54142df50c2c756d10.png)

What is this? Can i delete it/reduce its size?

---

<div class="post-metadata">

**Author:** ![fakesamgregory](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/fakesamgregory/32/3903_2.png) [@fakesamgregory](https://forum.pinegrow.com/u/fakesamgregory)\
**Post date:** [August 6, 2024, 6:26pm UTC](https://forum.pinegrow.com/t/wp-pg-files-taking-up-a-lot-of-space-3gb/9054/2 "2024-08-06T18:26:42Z")

</div>

Am now getting the following error and cannot see my project.

> There was at least one error while upgrading the database schema. Please report the following error: INSERT, UPDATE command denied to user ‘u609307915\_DVXAo’@‘127.0.0.1’ for table `u609307915_xNs0h`.`wp_options`

---

<div class="post-metadata">

**Author:** ![Emmanuel](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/emmanuel/32/6294_2.png) [@Emmanuel](https://forum.pinegrow.com/u/Emmanuel)\
**Post date:** [August 7, 2024, 8:10am UTC](https://forum.pinegrow.com/t/wp-pg-files-taking-up-a-lot-of-space-3gb/9054/3 "2024-08-07T08:10:10Z")

</div>

@fakesamgregory

First off, how many projects have you set up on this instance? (The number of projects, the number of revisions per project, and other factors can have an influence on the size.)

Note: In my test project that uses your GitHub repository, this same table weighs in at 47MB.

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/pinegrow/original/2X/f/f60bf960dbfb9de839bd7d3825c20e5908fa8ace.png)

Note: Since you’ve taken a look, you’ve probably realized that this table is crucial for managing all the content produced by the plugin.

> [@fakesamgregory](#):
>
> Am now getting the following error and cannot see my project.
> 
> > There was at least one error while upgrading the database schema. Please report the following error: INSERT, UPDATE command denied to user ‘u609307915\_DVXAo’@‘127.0.0.1’ for table `u609307915_xNs0h`.`wp_options`

I don’t have a specific answer about this issue right now, but have you tried messing around with the database at all after noticing how big it was? Did you attempt any tweaks or changes to see if you could reduce its size?

Well, I’m pretty sure you’re going to tell me “of course not,” but it’s still worth asking the question anyway 😉

---

<div class="post-metadata">

**Author:** ![fakesamgregory](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/fakesamgregory/32/3903_2.png) [@fakesamgregory](https://forum.pinegrow.com/u/fakesamgregory)\
**Post date:** [August 7, 2024, 8:28am UTC](https://forum.pinegrow.com/t/wp-pg-files-taking-up-a-lot-of-space-3gb/9054/4 "2024-08-07T08:28:32Z")

</div>

@Emmanuel

I actually can’t remember but at the very most deleted old versions of files as I saw duplicates. I assumed these are old instances of the html files. It wouldn’t have been a huge dump. At most 10 files. Hopefully this isn’t an issue but regardless, this database just seems to keep growing so would be nice to… not have that.

---

<div class="post-metadata">

**Author:** ![Emmanuel](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/emmanuel/32/6294_2.png) [@Emmanuel](https://forum.pinegrow.com/u/Emmanuel)\
**Post date:** [August 7, 2024, 8:40am UTC](https://forum.pinegrow.com/t/wp-pg-files-taking-up-a-lot-of-space-3gb/9054/5 "2024-08-07T08:40:20Z")

</div>

@fakesamgregory

Tip: Try deleting unwanted revisions directly from the plugin itself.  
It’s more convenient (I mean, instead of tinkering around in the database directly) and this table will undergo an interesting weight transformation.

 ![SCR-20240807-jqev](https://canada1.discourse-cdn.com/flex036/uploads/pinegrow/original/2X/d/d5bd09e371222fed7fdae096c455a46f8f85b149.png)

I just did it, and here’s what changed:

BEFORE

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/pinegrow/original/2X/f/f60bf960dbfb9de839bd7d3825c20e5908fa8ace.png)

AFTER

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/pinegrow/original/2X/a/a737a8392d7404843b39753e4dab9283957142c5.png)

---

<div class="post-metadata">

**Author:** ![fakesamgregory](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/fakesamgregory/32/3903_2.png) [@fakesamgregory](https://forum.pinegrow.com/u/fakesamgregory)\
**Post date:** [August 7, 2024, 8:56am UTC](https://forum.pinegrow.com/t/wp-pg-files-taking-up-a-lot-of-space-3gb/9054/6 "2024-08-07T08:56:12Z")

</div>

Thank you. The only reason for going to the database was to identify what was clogging it up. I had no idea it was backups.

Problem now is I can’t even open my project!!

Let me see if I can upgrade my storage temporarily

---

<div class="post-metadata">

**Author:** ![Emmanuel](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/emmanuel/32/6294_2.png) [@Emmanuel](https://forum.pinegrow.com/u/Emmanuel)\
**Post date:** [August 7, 2024, 10:52am UTC](https://forum.pinegrow.com/t/wp-pg-files-taking-up-a-lot-of-space-3gb/9054/7 "2024-08-07T10:52:03Z")

</div>

> [@fakesamgregory](#):
>
> I had no idea it was backups.

@fakesamgregory  
Not backup, but Revisions.  
Under the hood of the plugin, Pinegrow projects are managed through a specific custom post type. As a result, they utilize WordPress’s standard feature of revision management, which is unlimited by default. This allows for easy tracking and restoration of project changes over time.

Quick summer thinking here (without any real guarantee of reliability) : Regarding your database issue, I do have a solution, but it’s pretty drastic. It would involve uninstalling the plugin, deleting the affected table, reinstalling the plugin, and then reimporting the project. I know it’s not ideal, but it might be the quickest way to fix things if you’re stuck with a broken table …

---

<div class="post-metadata">

**Author:** ![fakesamgregory](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/fakesamgregory/32/3903_2.png) [@fakesamgregory](https://forum.pinegrow.com/u/fakesamgregory)\
**Post date:** [August 7, 2024, 11:09am UTC](https://forum.pinegrow.com/t/wp-pg-files-taking-up-a-lot-of-space-3gb/9054/8 "2024-08-07T11:09:30Z")

</div>

Thanks for the suggestion, I appreciate that but it’s out of the question because I don’t have an export of my site new enough to restore, unless you have a suggestion there?

I’ve increased the size of my database and waiting for that to take affect. Hoping this might fix otherwise I’ll have to download my live site and re-implement the Wordpress hooks which is less than ideal.

Maybe there’s no way to check that the available storage of the computer it’s running on but maybe there are some settings to limit how much space revisions take up or dates to automatically delete from (e.g. \> 1 month).

---

<div class="post-metadata">

**Author:** ![fakesamgregory](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/fakesamgregory/32/3903_2.png) [@fakesamgregory](https://forum.pinegrow.com/u/fakesamgregory)\
**Post date:** [August 7, 2024, 11:10am UTC](https://forum.pinegrow.com/t/wp-pg-files-taking-up-a-lot-of-space-3gb/9054/9 "2024-08-07T11:10:30Z")

</div>

I’m thinking i export my whole site, get it running locally for now. Hopefully I’ll see it work with more data

---

<div class="post-metadata">

**Author:** ![Emmanuel](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/emmanuel/32/6294_2.png) [@Emmanuel](https://forum.pinegrow.com/u/Emmanuel)\
**Post date:** [August 7, 2024, 11:22am UTC](https://forum.pinegrow.com/t/wp-pg-files-taking-up-a-lot-of-space-3gb/9054/10 "2024-08-07T11:22:14Z")

</div>

> [@fakesamgregory](#):
>
> Maybe there’s no way to check that the available storage of the computer it’s running on but maybe there are some settings to limit how much space revisions take up or dates to automatically delete from (e.g. \> 1 month).

Improvements are definitely planned in that direction.  
We’re working on making things better along those lines.

---

<div class="post-metadata">

**Author:** ![fakesamgregory](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/fakesamgregory/32/3903_2.png) [@fakesamgregory](https://forum.pinegrow.com/u/fakesamgregory)\
**Post date:** [August 7, 2024, 11:26am UTC](https://forum.pinegrow.com/t/wp-pg-files-taking-up-a-lot-of-space-3gb/9054/11 "2024-08-07T11:26:53Z")

</div>

Ok update, I deleted all the plugins (via ftp) which gave me enough space to open my project and download the project. Can now remove revisions and clear some space

---

<div class="post-metadata">

**Author:** ![fakesamgregory](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/fakesamgregory/32/3903_2.png) [@fakesamgregory](https://forum.pinegrow.com/u/fakesamgregory)\
**Post date:** [August 8, 2024, 8:36am UTC](https://forum.pinegrow.com/t/wp-pg-files-taking-up-a-lot-of-space-3gb/9054/12 "2024-08-08T08:36:07Z")

</div>

This was resolved by deleting plugins via FTP to free up space which allowed me to go into Pinegrow and remove revisions then re-upload plugins.

Something to bear in mind is to clear revisions as you said.

---

<div class="post-metadata">

**Author:** ![miltonardila](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/miltonardila/32/2396_2.png) [@miltonardila](https://forum.pinegrow.com/u/miltonardila)\
**Post date:** [August 8, 2024, 11:00am UTC](https://forum.pinegrow.com/t/wp-pg-files-taking-up-a-lot-of-space-3gb/9054/13 "2024-08-08T11:00:39Z")

</div>

> [@Emmanuel](#):
>
> Note: In my test project that uses your GitHub repository, this same table weighs in at 47MB.

Hi @Emmanuel,  
Sorry for the following question, taking advantage of this thread.  
Is it necessary to upload these PG files to the server in production?  
I don’t use Pinegrow for WordPress, I use it for HTML projects with Tailwind or Bootstrap. So I also use Github, and instead of uploading via FTP, I just do Pull.  
Could I put these files and folders in gitignore?

Best regards and thank you.

---

<div class="post-metadata">

**Author:** ![Emmanuel](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/emmanuel/32/6294_2.png) [@Emmanuel](https://forum.pinegrow.com/u/Emmanuel)\
**Post date:** [August 8, 2024, 11:54am UTC](https://forum.pinegrow.com/t/wp-pg-files-taking-up-a-lot-of-space-3gb/9054/14 "2024-08-08T11:54:36Z")

</div>

@miltonardila

I’m not sure I understand the question, so I’ll just clarify a few concepts:

A static HTML project generated or edited by Pinegrow uses HTML documents, CSS files, and possibly JS. Everything else consists of configuration and settings files that, while they may be necessary for Pinegrow’s advanced functions, are not needed in production. Therefore, they can be ignored for the version that goes live, but they should remain in your project if you plan to continue editing it with Pinegrow.

Specifically, which files are you referring to?

I hope this answers your question. P.S. For new topics, feel free to create new topics on the forum; it’s more effective for future searches by interested users.

---

<div class="post-metadata">

**Author:** ![fakesamgregory](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/fakesamgregory/32/3903_2.png) [@fakesamgregory](https://forum.pinegrow.com/u/fakesamgregory)\
**Post date:** [August 8, 2024, 11:59am UTC](https://forum.pinegrow.com/t/wp-pg-files-taking-up-a-lot-of-space-3gb/9054/15 "2024-08-08T11:59:16Z")

</div>

I think I understand but there’s probably a misunderstanding.

These are database entries into MySql. These wont exist in a local version of Pinegrow.

Some files/folders which are not necessary in a static website upload…

- \_pgbackup
- \_pginfo
- .git (if you’re using git)
- any masterpages
- pinegrow.json

In short, as @Emmanuel stated, you just need to upload your HTML, CSS and JavaScript file. No Pinegrow specific files are needed but saying all that, as your using git, you’ll want them there and they wont harm your production deployment, just take up unnecessary space. I’d probably put \_pgbackup in your .gitignore or somehow prevent that from deploying (there must be a way)

---

<div class="post-metadata">

**Author:** ![miltonardila](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/miltonardila/32/2396_2.png) [@miltonardila](https://forum.pinegrow.com/u/miltonardila)\
**Post date:** [August 8, 2024, 1:55pm UTC](https://forum.pinegrow.com/t/wp-pg-files-taking-up-a-lot-of-space-3gb/9054/16 "2024-08-08T13:55:46Z")

</div>

Thank you for your answers @Emmanuel and @fakesamgregory.

Both of you have answered my questions. I always add everything to my commit thinking that some file, like the ones mentioned by Samuel, might be needed. It’s not really a lot of weight, but an unnecessary amount of files in production that can lead to confusion.

Sorry Emmanuel for opening this topic in this thread, but it seemed appropriate. I’ll know for the next one. Thanks again for the development of Pinegrow, it is an excellent tool.
