Saturday, October 21, 2017

WordPress php File Limit & Exhausted Error

Ever came across the file size limit on php while trying to upload a new wordpress theme?

Well here's how to bypass it by editing your php.ini
memory_limit = 128M upload_max_filesize = 100M post_max_size = 128M file_uploads = On
If you are using cPanel, name the file php.ini
If you're using one of the older Classic Hosting Linux servers, call the file php5.ini
Upload the file to the root directory of your hosting plan. For cPanel, that would be public_html.
For the older servers, it's just the main / folder.

To resolve the exhausted error just navigate to your wp-config.php file and define the new memory limit as shown below(paste it before the "That’s all, stop editing! Happy blogging." line.)
define( 'WP_MEMORY_LIMIT', '256M' );