Increasing various php limits in php for joomla wordpress and other hosting scripts

To edit the server default settings for Wordpress and Joomla requirements as well as other php applications you can edit and insert the following lines in the configuration files to allow your to change the limits on your website

You can create a .user.ini file in the root folder of the website, this is "wwwroot" in the file manager

.USER.INI File (please note the settings will only apply after a 5min period)

You can create .user.ini file and put setting (without any indent or space) . for example  .user.ini config is:

max_execution_time=600"
upload_max_filesize=200M"
post_max_size=200M"
memory_limit=256M
"

Alternatively you can do it in the application config file itself.


Wordpress

1. Edit wp-config.php file

@ini_set( 'upload_max_filesize' , '128M' );
@ini_set( 'post_max_size', '128M');
@ini_set( 'memory_limit', '256M' );
@ini_set( 'max_execution_time', '300' );
@ini_set( 'max_input_time', '300' );

for wordpress memory limit alone you can use
define( 'WP_MEMORY_LIMIT', '256M' );

OR

2. Navigate to your active theme folder in "wp-content" and edit your "functions.php" file. Open it up, and at the very top, insert:

@ini_set( 'upload_max_filesize' , '128M' ); 
@ini_set( 'post_max_size', '128M');
@ini_set( 'memory_limit', '256M' );
@ini_set( 'max_execution_time', '300' );
@ini_set( 'max_input_time', '300' );

for wordpress memory limit alone you can use
define(
'WP_MEMORY_LIMIT', '256M'
);

Joomla
edit the configuration.php file in the root folder and at the top of the file insert

ini_set('post_max_size','64M');
ini_set('upload_max_filesize','64M')

and then save the file

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Wordpress error when updating plugins or upgrading

Wordpress since version 3.2 has been giving some clients issues, to resolve this problem, edit...

Display detailed information rather than a generic 500 error

If you are receiving the dreaded 500 error, you can follow the below temporary patches to display...

Wordpress - Thumbnails do not show when using an elegant themes theme

Fix | Thumbnails Not Working in a WordPress Theme From Elegant Themes On some web hosts,...

Wordpress - Stop your site from getting hacked

How to Stop Your WordPress Blog Getting Hacked Un-beknownst to most people who set up a website,...