solution
How to Fix Memory Exhausted Error in WordPress?
While working on WordPress website, the Fatal Error occurrence is one of the WordPress common issues. Every WordPress user may experience this “Allowed Memory Size Exhausted Error” at least once. In this article, we will show you how to Fix WordPress Memory Size Exhausted Error easily.
Fixing “Memory Exhausted Error” in WordPress
The Memory Size Exhausted Error is one of the common errors in WordPress Site. When this error occurs, the visitors can frustrated and quit from your WordPress website quickly. This will make your website ranking down. So, you need to know how to resolve this Memory Exhausted Error on your WordPress site. Here you can find the easy ways to fix the “Fatal Error: allowed memory size” in WordPress site.
What is Memory Exhausted Error ?
The Memory Limit can exceed because of WordPress plugins and WordPress themes you installed on your WordPress site. When you exceed the default Memory Limit of your WordPress Site, this “Fatal Error: Allowed memory size” will raise. The Fatal Error: Allowed memory size of WordPress site is also called as Memory Exhausted Error.
How to Fix WordPress Memory Exhausted Error ?
If you get this error in your WordPress site then you need to increase the PHP Memory limit. There 2 ways to increase the memory limit in PHP. Those are
- Increase PHP Memory Limit with admin access.
- Increase PHP Memory Limit without admin access.
Increasing of Memory Limit with admin access is easy when compared to without admin access.
Increase PHP Memory Limit with admin access
Because of the Fatal Error, your WordPress site does not work properly but it gives you the access to your admin area. In that case, you have to follow the given process and resolve your Memory Exhausted Error.
Edit ‘wp-config.php’ File
- First, you have to login to your WordPress website admin area.
- The WordPress dashboard of your site will appear on the screen.
- In the screen left side navigation bar, the Appearance link is available.
- Click on the Editor option from the Appearance tab.
- Now, you can add the given code to the file.
define('WP_MEMORY_LIMIT', '64M');
- After adding the code to the file, you have to click on the update file button.
- The file was updated successfully.
- Now, Reload your site front end.
- Finally, the website can work properly without Memory Exhausted issue.
Increase PHP Memory Limit without admin access
Sometimes you may lose access to your WordPress admin area because of the Memory Size Exhausted Error. To overcome this error, you have to access your website through FTP. It is difficult for the beginners when compared to experienced ones. Don,t worry about it. Have a look on the given process. Here we described the possible ways to fix Fatal Error in your WordPress website.
Edit ‘wp-config.php’ File
- First, You have to access your WordPress site with FTP.
- Download the wp-config.php file from your WordPress site.
- Now, Open the wp-config.php file with text editor.
- Next, add the given code to the file.
define('WP_MEMORY_LIMIT', '64M');
- This given code can be changed based on the server you are used.
- Now, save the file.
- Next, Upload the file from Where it is downloaded.
- The old wp-config.php file can be overwritten by the new file.
- Refresh your WordPress Site.
- Check the website can work properly or not.
This is one of the easy ways to resolve this “Fatal Error: allowed memory size” from your WordPress Site.
Edit ‘php.ini’ File
First, you have to check your WordPress site has the php.ini file access or not. If you have the access to your WordPress php.ini file then follow the with access process. Else, you have to follow the second process to fix this error.
With php.ini file access
- Access your WordPress website through FTP.
- Download the php.ini file from your WordPress website.
- Next, Open the php.ini file with text editor.
- Add the given code to the file.
memory_limit = 64M;
- Now, save the file.
- Next, upload the file where it is downloaded from.
- The old php.ini file can be overwritten by the new file.
- Now, you have to refresh your site front end.
- Check, the WordPress website can work without any error or not.
Without php.ini file access
- Open your WordPress site root directory with the FTP access.
- Create a new file with the php.ini name.
- Add the given code to the file.
memory_limit = 64M;
- Now, save the file.
- Reload your WordPress website. Now, It can work properly.
Edit ‘.htaccess’ File
This is one of the easy methods to resolve Memory Exhausted Error in your WordPress Site without admin access. Follow the steps and get out from the Fatal Error.
- First, you have to Open wp-includes folder of your WordPress.
- Now, Click on the Server tab from the menu.
- The menu will display with various options.
- Choose Force Showing Hidden Files option from it. Actually, the FTP Program hides the Dotfiles. The .htaccess is one Dotfile.
- Now, you have to search for the .htaccess file.
- Next, Download the .htaccess file.
- Open the file with text editor and Add the given code to it.
php_value memory_limit 64M;
- Now, save the file.
- Upload the file where it is downloaded from.
- The old .htaccess file can be overwritten by the new file.
- Reload your WordPress website front end.
- Finally, The website can work without Memory Size Exhausted issue.
We hope this article will guide you to fix “Fatal Error: allowed memory size” in WordPress site. Stay connected with us to get Better guidance on WordPress.
