Increasing PHP Memory Limit
Sometimes sites may experience errors due to limited PHP memory. If this occurs, you need to increase the PHP memory limit for your hosting.
There are two methods to complete this:
Method 1 using the cPanel File Manager:
-
Log into your cPanel
-
Select File Manager under the Files category
-
Click New File
-
Name the file php.ini
-
Select the file in the list
-
Click Edit
-
Add the line memory_limit = #M where # equals the new php memory limit in MB; for example memory_limit = 64M
-
Click Save Changes
-
Click Close
-
If you are using Wordpress, select the php.ini file in the file list.
-
Click Copy
-
In the text field, add /wp-admin so that it reads /public_html/wp-admin
Method 2 Using a text editor and FTP:
-
Create a new document using a text editor such as Notepad (Windows), TextWrangler (Mac), or Sublime Text
-
Add the line memory_limit = yourmemorylimit M
-
For example: memory_limit = 64M would increase the PHP memory limit to 64 MB.
-
-
Save this file as php.ini
-
Log into your server through FTP using a FTP client such as FileZilla. The credentials will be the same as those for accessing your CPanel.
-
Upload the php.ini file to the public_html directory.
-
If you are using WordPress on your site, you must also upload the php.ini file to the wp-admin folder.