If you’re experiencing issues like “Fatal error: Allowed memory size of X bytes exhausted” or slow performance on your WordPress website, it could be due to a low PHP memory limit. Increasing the PHP memory limit can help resolve these issues and improve your site’s performance. Below are the steps to increase the PHP memory limit in cPanel, which you can access through your hosting account in your WHMCS portal.
Step 1: Log Into Your WHMCS Client Area
1.Access the Client Area: Go to your website and log into your Client Area.
2.Enter Credentials: Enter your registered email and password. If you don’t have an account, sign up and create one.
Step 2: Access cPanel via WHMCS
1.In your Client Area, locate the “Services” section and click on the hosting package you want to manage.
2.Find and click on the “Login to cPanel” button. This will automatically log you into your cPanel account for that service.
Step 3: Locate the “Select PHP Version” Option in cPanel
1.Once in cPanel, scroll down to the “Software” section.
2.Click on “Select PHP Version” (or “PHP Selector”, depending on your host).
Step 4: Increase PHP Memory Limit
1.After clicking on “Select PHP Version”, go to the “Options” tab.
2.Look for the “memory_limit” option.
3.Click on the current memory limit value and change it to a higher value, such as 256M or 512M (depending on your needs).
4.Save the changes by clicking “Save” at the bottom of the page.
Step 5: Verify the Change
To confirm that the PHP memory limit has been updated:
1.Create a phpinfo.php file: Open a text editor and create a file named phpinfo.php.
2.Add the following PHP code:
<?php
phpinfo();
?>
3.Upload the file to your website’s root directory using FTP or the File Manager in cPanel.
4.Access the file by visiting yourdomain.com/phpinfo.php in your browser.
5.In the displayed PHP information, search for memory_limit to ensure that the updated value is reflected.
After confirming the update, delete the phpinfo.php file from your server for security reasons.
Step 6: Alternative Method – Edit the php.ini File
If you don’t have the “Select PHP Version” option available, you can increase the memory limit manually by editing the php.ini file.
1. Access File Manager: From cPanel, open File Manager.
2.Locate php.ini: In the root directory of your WordPress installation, look for the php.ini file. If it’s not there, you can create a new file named php.ini.
3.Edit php.ini: Right-click the php.ini file and choose Edit. Add the following line:
memory_limit = 256M
4.Save the file and exit the editor.
Step 7: Modify .htaccess File (If Needed)
If the changes haven’t taken effect, you can also update the .htaccess file.
1. Go to File Manager in cPanel.
2.Locate the .htaccess file in the root folder of your website.
3.Right-click and choose Edit.
4.Add this line at the end of the file:
php_value memory_limit 256M
5.Save the changes and check your site again.
Step 8: Contact Support if Necessary
If you still face issues or can’t increase the PHP memory limit using the above methods, it may be due to server-level restrictions set by your hosting provider. In that case, you can contact our support team directly through your Client Area to request an increase in the PHP memory limit for your account.
Conclusion
Increasing the PHP memory limit in cPanel can resolve performance issues and help your WordPress website run more smoothly. By following the steps outlined above through your WHMCS Client Area and cPanel, you should be able to easily update your PHP memory limit. If you run into any trouble or need additional support, our team is here to assist you anytime.