# How to change PHP limits in cPanel

https://www.hostcarts.qa/knowledgebase/article/how-to-change-php-limits-in-cpanel

### **Steps**

1. Log in to **cPanel**
2. Scroll to **Software**
3. Open **MultiPHP INI Editor**
4. Choose your domain from the dropdown
5. Modify the PHP directives you need:
  - `memory_limit`
  - `upload_max_filesize`
  - `post_max_size`
  - `max_execution_time`
  - `max_input_vars`
6. Click **Apply**

## **Recommended Values (Typical Hosting)**

| Setting | Suggested Value |
| --- | --- |
| memory_limit | 512M |
| upload_max_filesize | 256M |
| post_max_size | 256M |
| max_execution_time | 300 |
| max_input_vars | 5000 |

## **Method 2 — Editing .htaccess (If INI Editor is locked)**

Works only if PHP is running as **CGI/FastCGI**.

Add this to your `.htaccess`:

```
php_value memory_limit 512M
php_value upload_max_filesize 256M
php_value post_max_size 256M
php_value max_execution_time 300
php_value max_input_vars 5000
```

If you get a **500 error**, your server doesn’t allow `php_value` overrides.

## **Method 3 — Creating/Editing php.ini or user.ini**

Some hosts use `php.ini`, others use `.user.ini`.

### **php.ini**

Create or edit:

```
memory_limit = 512M
upload_max_filesize = 256M
post_max_size = 256M
max_execution_time = 300
max_input_vars = 5000
```

### **.user.ini**

Same values:

```
memory_limit = 512M
upload_max_filesize = 256M
post_max_size = 256M
max_execution_time = 300
max_input_vars = 5000
```

Changes may take **5–10 minutes** to apply.
