How to increase php memory limit

Here you have 5 different methods for setting php memory limit. If you have any difficulties with php memory limit during the installation of  WordPress, lime survey, drupal, joomla or oSclass you can use these methods for solving the issue.
It will work on the all the hosting service providers like godaddy hostgator..etc
1. Set the php value in the index.php file of installation

ini_set('memory_limit', '256M');

2. Create php.ini file in the home directory and set the below values

memory_limit = 128M
<IfModule mod_php5.c>
 php_value memory_limit 64M
 </IfModule>

3. Create .htaccess file in the home directory or copy the below codes to .htaccess file

upload_max_filesize = 1000M
 post_max_size = 2000M
 memory_limit = 3000M
 file_uploads = On
 max_execution_time = 180

4. setting up the .user.ini in your website root directory.

memory_limit = 128M

5. Setting up the memory limit in the php script.

ini_set('memory_limit', '256M');

Leave a Comment

WhatsApp Logo Chat