Aziz Ozbek
WordPress Expert from Zürich

Fatal error: Allowed memory size of bytes exhausted

If you are facing the Error “Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 2348617 bytes)”, it means that your WordPress installation does not have enough memory to execute what you want.  

This is one of the most common WordPress errors, and you can easily fix it by increasing the PHP memory limit.

There are two ways how you can increase the PHP memory limit.

Increase Memory in wp-config.php

Use a FTP (file transfer protocol) or SSH file transfer protocol (SFTP) service to connect with and access your WordPress files. If you have hosting configuration tool like Plesk or cPanel you can edit the wp-config.php file directly on the browser. 


WordPress wp-config file in Plesk
WordPress wp-config file in Plesk

Open the wp-config.php file and search for following text or paste it in the file:

define('WP_MEMORY_LIMIT', '32M');

Edit the value “32M” to your desired value for example “256MB”. You can find out the maximum value of memory limit from your hosting provider.

Increase Memory in php.ini (Plesk, cPanel)

Root Server or Localhost

As in the wp-config option you should connect to your hosting package through FTP or SFTP. Since you have access to server configuration you can edit the “php.ini” file. On Linux Server you can find the php.ini file unter following directory:

Ubuntu 16.04: /etc/php/7.0/apache2
CentOS 7: /etc/php.ini

Like in the wp-config file edit following line in php.ini file to increase the memory limit:

memory_limit = 256M

Shared Hosting

On the shared hosting you most likely won’t have permission to edit the server configuration files. For this matter shared hosting providers offer tools like Plesk, cPanel etc.
Simply open your hosting configuration tool and navigate to domain which you want to edit. Go to hosting settings or php settings of the domain and edit the maximum allowed memory.


Edit php memory limit in plesk
Edit php memory limit in plesk
Rating: 5.0/5. From 1 vote.
Please wait...

Leave a Reply

Your email address will not be published. Required fields are marked *