Copyright © THE FAS SOLUTIONS 2010-2024 All Rights Reserved.
The “memory limit” error in WordPress often occurs when your website uses more memory than allowed by the server configuration. To fix this issue and increase the memory limit, follow this step-by-step tutorial:
Before making any changes, you need to identify the current memory limit of your WordPress site. To do this, create a PHP file called info.php
and upload it to your WordPress root directory using FTP. The file should contain the following code:
<?php
phpinfo();
?>
Save the file and then access it through your web browser by visiting http://yourdomain.com/info.php
. Look for the memory_limit
value, which will indicate the current memory limit for your website.
Make sure your server meets the minimum requirements for running WordPress. Check with your hosting provider to ensure that your server supports the necessary PHP version and configuration.
If your server allows custom PHP configuration, you can increase the memory limit by creating a php.ini
file. Create a plain text file called php.ini
and add the following code:
memory_limit = 256M
Replace 256M
with the desired memory limit (e.g., 512M) based on your needs. Save the file.
Upload the php.ini
file to your WordPress root directory using FTP. If there is already a php.ini
file present, you can edit it instead of creating a new one.
If you cannot use a php.ini
file, you can try modifying the .htaccess
file to increase the memory limit. Access your WordPress root directory and find the .htaccess
file. Add the following code at the end of the file:
php_value memory_limit 256M
Replace 256M
with your desired memory limit. Save the changes.
If the above methods didn’t work, you can increase the memory limit directly from the wp-config.php
file. Access your WordPress root directory and find the wp-config.php
file. Open it in a text editor and add the following code just before the line that says “That’s all, stop editing!”:
define( 'WP_MEMORY_LIMIT', '256M' );
Replace 256M
with your desired memory limit. Save the file.
Sometimes, memory limit errors can be caused by poorly coded plugins or themes. Deactivate all plugins and switch to a default theme (e.g., Twenty Twenty-One). If the memory limit error disappears, it means one of the plugins or the theme was causing the issue. Reactivate each plugin and theme one by one to identify the problematic one.
If you’ve tried all the above steps and are still encountering memory limit errors, it’s possible that your hosting provider has a limit set that cannot be overwritten. In this case, reach out to your hosting provider’s support team and ask them to increase the memory limit for your website. If you are still unable to resolve the issue then Contact us for our professional service for further assistance.
By following these step-by-step instructions, you can increase the memory limit and fix memory limit errors in WordPress. Increasing the memory limit can improve the performance and stability of your website, especially if you are running resource-intensive plugins or themes. Remember to always backup your website before making any changes to avoid data loss.
If you require professional assistance is setting up or customizing your WordPress site, our team at The FAS Solutions is here to help. Whether you need development services, design support, or any other related assistance, please feel free to Contact us.
Copyright © THE FAS SOLUTIONS 2010-2024 All Rights Reserved.
This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.
Strictly Necessary Cookie should be enabled at all times so that we can save your preferences for cookie settings.
If you disable this cookie, we will not be able to save your preferences. This means that every time you visit this website you will need to enable or disable cookies again.