Welcome to our Support Center
< All Topics
Print
How to Increase the PHP Memory Limits in WordPress
PostedApril 2, 2023
UpdatedJuly 7, 2023
ByNishant
To increase the PHP memory limit in WordPress, you can follow these steps:
- Locate the wp-config.php file: Connect to your WordPress site using an FTP client or access the file manager provided by your hosting control panel. Look for the “wp-config.php” file in the root directory of your WordPress installation.
- Create a backup: Before making any changes to the file, it’s always a good practice to create a backup of the original “wp-config.php” file. This ensures that you can restore the file in case any issues arise.
- Open the wp-config.php file for editing:
- Add the memory limit code: Locate the line that says
/* That's all, stop editing! Happy blogging. */
near the end of the file. Just above that line, add the following code:
define ('WP_MEMORY_LIMIT', '256M');
This code increases the PHP memory limit to 256 megabytes (MB). You can adjust the value as needed based on your site’s requirements. Some plugins or themes may require higher memory limits.
- Save and upload the modified file: After adding the code to increase the memory limit, save the wp-config.php file on your computer. Then, upload it back to the root directory of your WordPress installation, replacing the existing file.
- Verify the increased memory limit: To confirm that the PHP memory limit has been increased, you can use a plugin like “WP-ServerInfo” or “PHP Info” that displays server information. Install and activate the plugin, then visit the corresponding settings page to check the PHP memory limit.
By following these steps, you should be able to increase the PHP memory limit for your WordPress site. However, note that some hosting providers may have restrictions on increasing the memory limit, and you may need to consult with your hosting support for further assistance if the changes don’t take effect.
-
WordPress
- Can I get Premium Images used in the theme demo?
- Customizer is not working
- How to add widgets in the Footer
- How to change Site Icon (Favicon) on your WordPress site
- How to create an admin user account in your WordPress website?
- How to fix Theme is missing the style css stylesheet error?
- How to generate Google Maps API Key?
- How to Increase the PHP Memory Limits in WordPress
- How to install WordPress
- How to resize images for my website
- How to speed up my website
- How to translate my website
- How to update my WordPress theme
- Most Common WordPress Theme Installation Errors
- What is a WordPress Child Theme? Why it is important?
- Where Is My Theme Purchase Code?
- WordPress Basics Explained
- Show Remaining Articles (2) Collapse Articles
-
Themeforest
-
Miscellaneous
-
Web Hosting
-
Prague
-
Google Maps