If you’re running a WordPress website and facing memory limit issues but don’t have access to cPanel, don’t worry! You can easily increase the PHP memory limit by modifying the wp-config.php file. This guide will walk you through the steps to boost your site’s PHP memory without needing cPanel access.
Why Increase PHP Memory Limit?
WordPress sites may experience issues like slow performance, white screens, or memory-related errors, especially when handling large plugins or complex themes. By increasing the PHP memory limit, you can resolve these problems and ensure smoother site performance.
Step-by-Step Guide to Increase PHP Memory Using wp-config.php
Step 1: Access Your Website via FTP or File Manager
Since you don’t have cPanel access, you can use an FTP client (like FileZilla) or a file manager provided by your hosting service to access your site’s files. Once you are connected, locate your WordPress installation’s root directory.
Step 2: Find and Edit the wp-config.php File
In the root directory of your WordPress site, look for the wp-config.php file. Download it or open it in a text editor. This file controls many important settings for your WordPress site.
Step 3: Add the PHP Memory Increase Code
Locate the part of the wp-config.php file right before the line that says /* That's all, stop editing! Happy blogging. */. Add the following line of code to increase the PHP memory limit:
Copy codedefine('WP_MEMORY_LIMIT', '256M');
This will increase your PHP memory limit to 256MB. You can adjust the value if you need more or less memory.
Step 4: Save and Upload the File
After adding the code, save the changes. If you downloaded the file, re-upload it to the server using your FTP client, replacing the original wp-config.php file.
Step 5: Check If the PHP Memory Limit Increase Was Successful
Once you have uploaded the modified file, you can check your site’s performance to ensure the memory limit issue is resolved. To verify the memory limit, you can also install a WordPress plugin like “WP Server Info” or use PHP info scripts to confirm the change.
Conclusion
By editing the wp-config.php file, you can increase the PHP memory limit on your WordPress site without needing access to cPanel. This method is simple, quick, and allows you to resolve memory-related issues and improve your site’s performance.
