Physical Memory Usage in cPanel

Sometimes, the server stats show that the physical memory usage in cPanel is in red. If you are new to hosting and managing a website, you might not know about this issue. Either way, you might want to fix this, right? If not, your website might also become inaccessible or might not function properly.

It might take a lot of time to load or you might see 508, 500, and 503 errors. So, this guide will cover everything you need to know about physical memory. We will see what is physical memory usage in cPanel and then see a few ways to decrease its usage.

What is physical memory usage in Cpanel?

Physical memory simply means the RAM that is allocated to you on your account. Every process that occurs on the website will use some physical memory. Therefore, if more processes are running on the website, the physical memory will be a lot more.

Does this mean the memory usage should be 0 if no processes are running? Unfortunately, No. Physical memory in cPanel is counted for every single process including Pop server, IMAP, etc. These are some of the processes that will always be running. So, the short answer here is no, the physical memory usage will never be zero.

How to reduce physical memory usage in cPanel?

There are many ways to reduce physical memory usage in cPanel. We will see a few ways you can decrease the usage. If you are using WordPress, we also have another section for you to decrease memory usage. So, you can even try that.

NOTE: Always take a backup of your website before changing the files.

1. CDN

The easiest thing you can try is to use a CDN. It stands for Content Delivery Network. It will filter out the useless/spam traffic from your website. This will even reduce the chances of a DDoS attack. As there won’t be any spam bots, the memory usage will decrease a bit. You can even add a free SSL certificate here.

Cloudflare offers free CDN. Many hosting providers already have partnered up with Cloudflare. So, you can activate it directly from the cPanel.

cpanel software

If not, you can always head over to the official website of Cloudflare and set it up from there.

2. Decrease the Entry Process

Entry processes mean the number of scripts running at a single time. If there are more scripts executed as soon as the page loads, it will trigger more physical memory usage. So, you can try to decrease them. You can also see the number of entry processes in the resource usage. If these increase more, the amount of physical memory will also increase.

3. Scan the Website

The presence of malware is one of the most ignored reasons for physical memory usage. People do all kinds of things to decrease usage but forget to check for malware. You can always try to scan your website to see if there is any malicious code on your website.

Don’t worry, you don’t need to go with any paid plugin or service, you can even use cPanel’s virus scanner to scan the website and look for malware. You can quarantine the file and see if the physical memory usage decreases.

virus scanner

4. Check for Scripts that are Executing Multiple Times

Sometimes, we have a script running on the website that might be executed multiple times. For instance, you might have a script that checks for the user’s action after every 30 seconds. If the script doesn’t have a clean and proper code, it will invite more trouble. You can always try disabling such scripts and try again.

5. Enable Caching

You can always enable caching to reduce physical memory. Most of the hosting providers already have cache. You can contact them to enable caching. If you are using any specific CMS, you can also look for the caching plugin that will do the job.

6. Advanced Methods

Now, we will see a few methods that can be used if you are a programmer.

  • Make sure that there are fewer Ajax scripts executed.
  • You can use MaxConnectionsPerChild (earlier it was MaxRequestsPerChild) to limit the process.
  • Optimize the database and code that might increase memory usage. We will soon cover how you can find such code or processes.

What if you tried all these things and nothing works? Well, in that case, you need to understand why physical memory usage is so high.

Why is my physical memory usage so high?

Is it common to have high physical memory usage? Let’s find out. We will see why your physical memory usage is too high.

Here are some things that you need to know.

  • If you are using shared hosting, it’s common problem where physical memory increases a lot and goes in the red. This is because shared hosting has a limited amount of memory allocated to your account.
  • Sometimes, the physical memory goes high due to a sudden traffic spike. It’s completely fine if your physical memory goes to 100% for a short period (usually in seconds or minutes).

If that’s not the case, you need to work on it.

To find the reason for the high usage, you have a few options to go with.

GTMetrix: You can scan your website with GTMetrix and you will get a complete resource graph that you can use to determine the memory usage.

resource usage graph

CPanel chart: You can also do that using cPanel. Head over to resource usage and you can see the complete chart of the resources used.

cpanel chart resource usage

We will soon see the exact steps to open this chart.

You can then optimize the processes that affect you the most. Disabling the module that is causing the issues will also work here. If the process is important and you can’t disable the process, you should probably change the hosting type. In shared hosting, it’s pretty common to see high physical memory usage. So, it’s better to upgrade.

How do web hosting types affect physical memory usage?

When you are using shared hosting, the resources are divided into a lot of users. Therefore, you will get a limited amount of resources including physical memory.

The solution here is to go with a VPS or Dedicated server. In VPS, the resources are divided among very few people, in a dedicated server, you will get all the resources for yourself.

If you are looking for the best solution, you can go with Cloud hosting. It allows you to use and scale the resources as needed. So, you can always go with cloud hosting if you always see the physical memory in red. When the physical memory is greater than 75% for a while, it’s a matter of concern.

Wondering how you can check it? Here is the way to check it.

How do I check my physical memory in cPanel?

To check your physical memory, you have to do it in two ways.

You will see the physical memory usage in the right sidebar.

physical memory usage

It’s just the current resource usage. If you want to know it in detail, you will have to use a different method.

You can simply head over to the “Resource usage” in cPanel.

metrics resource usage

In the quick overview, you can see if your website has exceeded the physical memory limit in the past 24 hours.

physical memory resource usage

You can click on “Details” or click on “Current usage” to see the complete chart as we have mentioned above.

How to fix physical memory usage in Cpanel?

Now, let’s see how you can fix physical memory usage in cPanel. We have already seen how you can reduce cPanel memory usage.

Now, if you want to fix it permanently. You have a few options.

  • You can either disable the plugins or code that uses the most amount of physical memory. Even optimizing them would work.
  • The next option will be to upgrade the hosting and go with the cloud, VPS, or dedicated server.
  • It’s also good to get the WP-Optimize plugin to optimize the database.
  • You can always delete the websites/subdomains that you are no longer using.
  • Contact your hosting provider to see if they have a solution for the same.

How do I increase physical memory in cPanel?

Well, you might be wondering if there is any way to increase memory in cPanel. Unfortunately, there is no way you can increase physical memory in cPanel. The only option you have here is to upgrade the plan.

So, you can always try to see if other plans offer more physical memory. Other than this, there is no way to increase memory.

Now, many people confuse the physical memory in cPanel with the memory of WordPress/other scripts. If you are using WordPress, there is a certain memory allocated to WordPress. In simpler words, WordPress will only use 64M memory. If the memory limits exceed, you will get a fatal error in WordPress.

You can easily increase this memory by heading over to the wp-config.php file in file manager. Thereafter, you can add the following line there.

define( ‘WP_MEMORY_LIMIT’, ‘256M’ );

This will increase the memory limit to 256M. In most cases, 128 is enough but we will keep it to 256 to remove all the errors.

How to fix physical memory usage Cpanel for WordPress?

If you are using WordPress, there are some easy ways to fix physical memory usage. You can surely follow all these methods to decrease memory usage in WordPress.

Heartbeat control and WP Crontrol

You might already know that when you are writing an article, WordPress will autosave the draft after a couple of seconds. This is a process. If there are more such processes, it will increase the physical memory usage as well as it will increase CPU usage. So, you can either disable such processes or you can increase the interval.

Heartbeat control is a plugin that will help you disable such processes or increase the time interval.

heartbeat control

You can surely install the plugin and do the configuration. You can modify the processes or you can disable them if you don’t need them.

In the same way, there is another plugin you can use called WP Crontrol. It’s an advanced plugin that allows you to disable more processes. You can increase the intervals of all the processes that are not much needed.

wp crontrol

If you are using WooCommerce, this might be a common issue that you will face. You can surely use the above plugins to reduce physical memory.

Some Themes and Plugins can be a Headache

Some themes and plugins might be executing a lot of processes. To make it a little bit technical, if a theme or plugin is using ajax-based scripts, they are highly responsible for increasing the physical memory of your cPanel.

The simple solution here will be to disable all the themes and plugins that you are not using. If a plugin is using a lot of memory, you can also try replacing it with a lightweight plugin.

You can also make sure that every theme and plugin is updated. Sometimes, the outdated plugin might be misbehaving.

NOTE: It’s always great to switch to the default theme to determine whether the theme is using high memory or not.

Recommended Plugins and Configuration

Before we sum up, let’s see a quick list of the plugins that you should use in WordPress.

  • A cache plugin like WP Rocket or W3 Total Cache.
  • When it comes to the security plugin, it might be increasing the physical memory as there is a lot of memory needed. You can try deactivating it for a while and check the stats again after a few minutes. We recommend you scan the complete website before disabling it. If there is any malware, the physical memory usage might go high.
  • It’s always great to have a backup plugin. If you are taking automated backups, make sure that the plugin is taking backup when there the traffic on your website is low.

Final Words

To conclude, this was all about fixing physical memory usage in cPanel. You can surely try the methods given above to reduce physical memory usage. If the problem is still there, you can always upgrade your hosting or shift to a cloud server. Cloudways is one of the best managed cloud hosting services you can use. They have various cloud partners from which you can choose your favorite one.

If you have any doubt about the methods, you can surely leave a comment below and we will try to help you in the best way possible.

How useful was this post?

Click on a star to rate it!

Average rating 4.7 / 5. Vote count: 3

No votes so far! Be the first to rate this post.

Tommy Nao
Tommy Nao
Web Hosting Expert, Content Writer, SEO Consultant, and Web Developer with over 10 Years of Experience.

He has a passion for technology and has spent over a decade reviewing and testing web hosting companies to provide his readers with honest and accurate reviews of the companies he had experiences with.

Tommy loves helping people and has helped hundreds of people start their own successful blogs.

Leave a Comment