fbpx

How to Increase WordPress Memory Limit Using cPanel: A Step-by-Step Guide

Introduction

Is your WordPress website running slow or crashing frequently? One common solution is to increase the PHP memory limit. This guide will walk you through the simple steps to increase your WordPress memory limit using cPanel.

Prerequisites

Before you proceed, ensure you have:

  • Access to your hosting cPanel
  • Basic understanding of file editing

Step-by-Step Guide

Step 1: Log in to cPanel

First, log into your cPanel account. The login details are usually provided by your hosting provider.

Step 2: Locate the Root Directory

Navigate to the “File Manager” and locate the root directory where your WordPress website is installed.

Step 3: Find the wp-config.php File

In the root directory, look for the wp-config.php file. This is a crucial file that contains various settings for your WordPress website.

Step 4: Edit the wp-config.php File

Double-click the wp-config.php file to open it. Then, select the “Edit” option.

Step 5: Insert the Code

Scroll down until you find the line:

/* That's all, stop editing! Happy publishing. */

Right above this line, insert the following code:

define('WP_MEMORY_LIMIT', '256M');

Your wp-config.php file should now look something like this:

phpCopy code

// ... previous lines of code define('WP_MEMORY_LIMIT', '256M'); /* That's all, stop editing! Happy publishing. */

Step 6: Save the Changes

After inserting the code, click “Save” to apply the changes.

Troubleshooting

If you encounter any issues, double-check the code you inserted to ensure it’s correct. If problems persist, consult with a professional.

Conclusion

Increasing the PHP memory limit in WordPress can significantly improve your website’s performance. With cPanel, this task is straightforward and can be done in a few simple steps. If you need further assistance, don’t hesitate to seek professional help.

Like this article?

Share on Facebook
Share on Twitter
Share on Linkdin
Share on Pinterest

Leave a comment