# Increasing PHP memory limit

#### How to find the current memory limit

You can find the current PHP memory limit from the ExpressionEngine 2 Control Panel

Go to: **Tools > Utilities > PHP Info** and search for the line “memory\_limit”

￼![](https://3476660910-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Ly1eNBG1JvS5rivVtg3%2Fuploads%2FTtTdgNMtAsdltwHIskQ9%2Ftools-php-info.png?alt=media\&token=55af00c8-fa16-484c-9446-937e0f8bbe04)

<div align="center"><img src="https://brandnewbox.co.uk/images/uploads/memory_limit.png" alt=""></div>

the first value (in the “Local” column) will tell you the current memory limit

#### Increasing the memory limit

Depending on your web hosting, you may be able to increase your memory limits. Some hosts will not allow this, or will limit the maximum amount of memory you can set. I’ve found some hosts are willing to set quite high limits if you explain it will be for a one-off data import and that it can be lowered again afterwards.

Your web hosting service will be able to tell you the appropriate way to increase you memory limit, but here is a summary of the options.

**.htaccess**

This is my preferred method as it makes it easy to set values of a site-by-site basis, but will not work under all hosting configurations. In a .htaccess file in the root of your website, add the line:

```
php_value memory_limit 128M
```

This will give you a memory limit of 128M.&#x20;

**php.ini**

If you are able to edit the server’s php.ini file you can modify the the memory limit there. Look for the line:

```
memory_limit = 64M
```

and adjust the value accordingly. This will apply to all sites.

You may also be able to create/modify a php.ini in the website’s root folder.
