WordPress, the backbone of our Kakkanadu, Ernakulam (Kochi)-based software development services, faces memory challenges. As a leading ‘Mobile App Development Company,’ optimizing PHP memory is crucial for seamless performance on our hosting servers.
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 2348617 bytes) in /home/username/public_html/site1/wp-includes/plugin.php on line xxx
WordPress typically attempts to raise the PHP memory limit automatically when it’s below 64MB, but 64MB may still be insufficient.
How to Fix This WordPress Memory Limit Error
When facing the ‘Allowed memory size of bytes exhausted’ PHP error, it indicates that your website may have reached its allocated memory limit. For a ‘Mobile App Development Company,’ addressing this issue is paramount. Begin by trying to increase the WordPress memory limit, adjusting the method based on your hosting environment.
Increase PHP Memory Limit
The PHP memory limit signifies the default amount of memory assigned by the server for a website’s operations. Various web hosting providers might utilize distinct server configurations, but WordPress typically comes with a default memory limit of 64M.
The default WordPress memory limit is 256 MB. SiteGround servers have a server PHP memory_limit configured to 768 MB for shared plans and can be extended for Cloud servers. You can verify this in the PHP Manager within Site Tools by searching for ‘memory_limit’ in the PHP Variables section.
Edit the wp-config.php
To raise the WordPress memory limit, you should modify your application’s wp-config.php file. This can be accomplished through your hosting’s File Manager, by using an FTP client with a designated FTP account, or by utilizing an SSH connection.
Generally, it’s a good practice to create backups of your site files before making any edits to them, just in case any issues arise.
If you prefer to edit the wp-config.php file using your File Manager, access the Site section in your Site Tools. Typically, you can locate this file in the public_html folder, which serves as the default root directory for your WordPress installation. If you’ve modified your WordPress directory, the configuration file should be within that specific folder.
To edit the wp-config.php file, right-click on it and select ‘Edit.’ Then, paste the following code snippet inside and save the changes. Ensure that you paste it just above the line /That’s all, stop editing! Happy publishing/.
define( ‘WP_MEMORY_LIMIT’, ‘512M’ );
If you see the line “define( ‘WP_MEMORY_LIMIT’, ‘256M’ );”, simply edit the value to 512M.
Keep in mind that 512M (MB) is the recommended memory limit for shared plans. If you’re on a Cloud plan, you can adjust the limit to your preference.
Once you’ve saved the changes, clear your browser cache, and then refresh your website. The ‘Allowed Memory Size of Bytes Exhausted’ error should no longer appear.
Check your php.ini file
The server checks the php.ini file for resource limit information before executing PHP scripts. While this file is not a core WordPress file, you may have it in your root folder if you’ve configured other PHP variables in the past. It’s essential to verify that the PHP memory value in php.ini is equal to or higher than the memory value defined in your wp-config.php. If it’s lower, your WordPress won’t effectively utilize the 512 MB memory limit you previously set.
Locate the php.ini file in the public_html directory of your website. Right-click on the file to open it for editing. Search for the line that defines the memory_limit variable and adjust its value as needed.
memory_limit = 512M
After making these adjustments, save the changes and refresh your site to check if the PHP ‘Allowed Memory Size of Bytes Exhausted’ error has been fixed.
Disable all plugins
If you’ve raised the memory limit but the ‘allowed memory size of bytes exhausted’ PHP error persists, consider deactivating your plugins. It’s probable that a plugin on your site has surpassed the memory limit, leading to a memory leak. This malfunctioning plugin triggers the ‘Allowed memory size exhausted’ error in your browser, resulting in website inaccessibility.
Hence, by deactivating your WordPress plugins, you can regain access to your site and then reactivate them individually to identify the problematic one.
For SiteGround users, disabling WordPress plugins can be done conveniently via Site Tools > WordPress > Install & Manage.
To disable all your WordPress plugins simultaneously, click the “Disable all plugins” button under the Actions menu and confirm the action.
Alternatively, you can disable all WordPress plugins directly from the database by following the steps in this article.
After that, log in to your WordPress Dashboard and systematically reactivate your plugins one by one. Once you reactivate the problematic plugin, you’ll encounter the “Allowed memory size of bytes exhausted” error. When this occurs, you’ve pinpointed the plugin responsible for the issue, and you should deactivate it again to regain access to your website.
In conclusion, if you’re grappling with WordPress’s fatal error, “Allowed memory size of bytes exhausted tried to allocate bytes,” attempt to boost your memory limit. If that proves ineffective, disable your plugins to restore site access and commence troubleshooting to identify the problematic one.
How We Can Support You?
With our roots firmly in Kakkanadu, Ernakulam (Kochi) and with over 12 years of experience, we have established ourselves as a leading force in the IT industry, providing tailored services that are both advanced and reliable.
Whether you’re initiating a new project, require assistance with existing systems, or need expert IT consultation, we’re your dedicated collaborators in achieving success. Our services extend beyond development; we are your partners in progress. Our solutions are tailored to align with your unique objectives, and we work closely with you to transform your vision into reality.
Contact us for all your IT-related needs, be it Website Development, Software Development, Mobile App Development, or expert consultation. Together, we can harness technology’s potential to reach greater heights.
Frequently asked questions
Dieutek Developments is located in Kakkanadu, Ernakulam (Kochi), with over a decade of experience in delivering high-quality IT solutions.
Dieutek Developments provides a comprehensive range of IT services, including website development, website redesign, custom software development, ecommerce store development, web and mobile app development, and digital marketing.
Certainly, Dieutek Developments offers concept-to-completion website development and website redesign services to cater to clients' specific needs.
Dieutek Developments excels in building ecommerce stores, providing customization options and expertise in integrating various platforms and tools, along with payment gateway integration both domestically and internationally.
Yes, Dieutek Developments offers mobile app development services for Android, iOS, Flutter, and hybrid platforms.
Absolutely, Dieutek Developments offers IT consultation services to assist clients in Kakkanadu, Ernakulam (Kochi), in aligning their IT strategies with their business goals.
Dieutek Developments has expertise in various industries, including Healthcare, Retail, E-commerce, Restaurants, Church, Education, NGO, Travel & Tourism, and Entertainment, providing tailored IT solutions for each sector.
Dieutek Developments boasts a team of 35+ professionals with over 13 years of experience in the IT industry, based in Kakkanadu, Ernakulam (Kochi).
In conclusion, tackling the ‘Allowed memory size of bytes exhausted’ error in WordPress, often linked to PHP memory constraints, is crucial. Elevate your site’s performance, especially if you’re a ‘Mobile App Development Company’ based in Kakkanadu, Ernakulam (Kochi), by increasing the PHP memory limit through WordPress configurations or adjusting settings in the php.ini file. Additionally, pinpoint and resolve memory issues by carefully managing plugins. For optimal results, consider seeking professional IT support to ensure your WordPress website runs smoothly and efficiently.