# PHP settings per site

**Project:** Sites | **Board:** Under review | **Votes:** 10
**URL:** https://roadmap.ploi.io/projects/2-site-level-requests/items/634-php-settings-per-site

---

We have global PHP settings for the server that are shared for all sites. 
I think it would be good to be able to modify the PHP settings at the site level.

**For example:** memory limit, max upload filesize, etc.

---

## Comments

**Logistic Design** (2024-04-12T09:33:42+00:00):
This would be really helpful, also because each site might have different needs

**Paul Phillips** (2024-08-14T15:02:22+00:00):
This would be very handy. We currently use this in the PHP settings on our old server.
`auto_prepend_file = "config.php"`

Being able to turn on `display-errors` in the PHP settings for a sub-domain would be nice too.

**Paul Phillips** (2024-08-15T13:55:56+00:00):
Found a way around this for anyone else in the same boat. Edit the main FPM ini file via Ploi and uncomment this line 

```
user_ini.filename = ".user.ini"
```

Then add `.user.ini` in the web root folder for you domain with your custom PHP settings and you should be good to go. I didn't have to change anything so mydomain.com/.user.ini is not browseable.

If you make changes to your `.user.ini` file, **don't forgot to reload the PHP FPM worker**.

