<p>I think what ended up working was restoring backed up composer.json and composer.lock files, deleting everything in /vendor directory, and then running <code>composer install</code></p>

CC BY-SA 4.0
2020-01-17T23:29:12.847Z
I ran into this issue while taking over a project. My issue was my DB had updated plugins that my `composer.json` file didn't have. Removing the `vendor` folder and the `composer.` files, then adding the correct `composer.json` file that matched the updated DB worked as well.
Jeff Irwin
CC BY-SA 4.0
2019-07-15T00:54:46.063Z
2019-07-15T00:54:46.063Z
Roger Glenn
<p>Steps to reproduce:</p>

<ol>
<li>Log into control panel,</li>
<li>Go to Plugin Store tab and install a plugin (in my case hillholliday/craft-user-manual or dolphiq/sitemap),</li>
<li>Plugin installation error screen,</li>
<li>Navigate to /admin and entire site errors out with this message (control panel and frontend)</li>
</ol>

<p><code>unserialize(): Error at offset 0 in ProjectConfig.php</code></p>

<p><a href="https://i.sstatic.net/b22Ex.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/b22Ex.png" alt="enter image description here"></a></p>

<p>Unsuccessful attempts to correct the issue include:</p>

<ol>
<li><p>Restoring latest database backup</p></li>
<li><p>Restoring backed up composer.json and composer.lock files from storage/composer-backups and running <code>composer install</code></p></li>
<li><p>Clearing <code>storage/runtime/cache</code></p></li>
</ol>

<p>Any suggestions on how to resolve this issue, and insights to why it's happening in the first place?</p>

CC BY-SA 4.0
2019-07-14T20:07:25.397Z
Have you already tried to install the plugins via composer? I have reproduced the steps and I don't get the error.
Fred
CC BY-SA 4.0
2019-07-15T00:53:59.367Z
Thanks for replying! Yes, I tried uninstalling and re-installing the plugins via composer and that didn't work either. I eventually got my site back up and running after scrambling and trying a bunch of different things. I think what ended up working was restoring backed up composer.json and composer.lock files, deleting everything in /vendor directory, and then running composer install.
Roger Glenn
<plugins>
unserialize(): Error at offset 0 after attempting to download and install plugin within control panel
# unserialize(): Error at offset 0 after attempting to download and install plugin within control panel

(Asked by: username_0 on 2019-07-14)

Steps to reproduce:

1. Log into control panel,
2. Go to Plugin Store tab and install a plugin (in my case hillholliday/craft-user-manual or dolphiq/sitemap),
3. Plugin installation error screen,
4. Navigate to /admin and entire site errors out with this message (control panel and frontend)

`unserialize(): Error at offset 0 in ProjectConfig.php`

[![enter image description here](https://i.sstatic.net/b22Ex.png)](https://i.sstatic.net/b22Ex.png)

Unsuccessful attempts to correct the issue include:

1. Restoring latest database backup
2. Restoring backed up composer.json and composer.lock files from storage/composer-backups and running `composer install`
3. Clearing `storage/runtime/cache`

Any suggestions on how to resolve this issue, and insights to why it's happening in the first place?

**Tags:** plugins

> **Comments:**
> **username_1**: Have you already tried to install the plugins via composer? I have reproduced the steps and I don't get the error.  
> **username_0**: Thanks for replying! Yes, I tried uninstalling and re-installing the plugins via composer and that didn't work either. I eventually got my site back up and running after scrambling and trying a bunch of different things. I think what ended up working was restoring backed up composer.json and composer.lock files, deleting everything in /vendor directory, and then running composer install.  

---

## 1 answers

### Answer by username_0 on 2019-07-15. Score: 2

I think what ended up working was restoring backed up composer.json and composer.lock files, deleting everything in /vendor directory, and then running `composer install`

> **Comments:**
> **username_2**: I ran into this issue while taking over a project. My issue was my DB had updated plugins that my `composer.json` file didn't have. Removing the `vendor` folder and the `composer.` files, then adding the correct `composer.json` file that matched the updated DB worked as well.  

---

