How to Increase WordPress Memory Limit
Increasing the memory limit in WordPress can help improve performance, especially for resource-intensive plugins and themes. Follow these steps to increase the memory limit:
Step 1: Log into cPanel
Log into your cPanel from within your Clouduxe client account.
Step 2: Access File Manager
Locate and click the "File Manager" menu in the Files section.
Click on the
public_html
folder.
Step 3: Edit wp-config.php
Search for the
wp-config.php
file, right-click on it, and select "Edit."
The wp-config.php
file is crucial for your WordPress installation, so be careful when editing it.
Step 4: Add Memory Limit Code
Add the following code right before the line that says:
// That's all, stop editing! Happy blogging.
You can enter any value where
512M
is stated, depending on your needs and server capabilities.
Alternative Method: Modify default-constants.php
If necessary, you can also change the memory limit in the wp-includes
folder by editing the default-constants.php
file. However, this method is less common.
Step 5: Confirm Changes
To confirm that your changes have taken effect, create a phpinfo.php
file. Here’s how:
In the File Manager, create a new file named
info.php
.Add the following code to the file:
Save the file and navigate to
yourdomain.com/info.php
in your browser.
Conclusion
Increasing the WordPress memory limit can enhance your site's performance and stability. Always remember to back up your site before making changes to configuration files.
Setting an excessively high memory limit can lead to server issues. Always check your hosting provider's recommended limits.
Last updated
Was this helpful?