How to Increase WordPress PHP Memory Limit in wp-config.php
Learn how to Increase the PHP memory limit on a WordPress website to solve associated server errors. Server errors such as Internal Server Error 500 Error, allowed memory size exhausted, out-of-memory errors during backup or import, plugin or theme installation failures, and White Screen of Death (WSOD) are prone to WordPress.
This blog will guide you on how to increase memory limit by editing wp-config.php in WordPress’ file manager. WordPress websites especially e-commerce websites that need high physical memory encounter issues related to memory limits, especially when the website depends on resource-intensive themes and plugins.
This blog majors in increasing the PHP memory limit by editing the wp-config.php file in your WordPress root directory.
By increasing the memory limit in a WordPress website, you are increasing the server resources, to ensure optimal website performance. This is because users navigate easily on a website that loads quickly and is not prone to errors.
Steps to Increase WordPress PHP Memory Limit
First, start by logging in to your cPanel and locating the “File Manage” to access all WordPress files and folders.
Locate and open the public_html folder. The public html folder/ file is the root folder for the WordPress websites.
Right-click the wp-config.php file and select the “Edit” option to open it.
Lastly, scroll down to the comment that says “/* That’s all, stop editing! Happy publishing. */” and paste the define(‘WP_MEMORY_LIMIT’, ‘500M’); code and click save.
- define(‘WP_MEMORY_LIMIT’, ‘500M’);
Increasing the PHP memory limit by editing the
wp-config.php
file helps to optimize WordPress websites, which elevates website performance and user experience. Errors like “Allowed memory size of x bytes exhausted,” can be solved by learning how to increase your PHP memory limit on a WordPress website.
For those looking to optimize their WordPress sites further, consider other best practices such as managing plugins, optimizing images, and leveraging caching solutions. Keeping your WordPress installation up-to-date and following optimization tips will skyrocket your wordpress website speed and performance.
Leave a Reply