Do You face problems uploading large files on WordPress? And You failed to import a large demo file. It is because of your WordPress site memory limit. In this article, We will show How to increase WordPress memory limits.
In case there are many ways to increase memory limits. Memory limits are two part one PHP memory limits and WordPress internal Memory limits. We will show those two parts how to Change it.
How to increase PHP memory limits on server:
If we want to increase PHP memory limits we need to work on cPanel. Or we have some plugin to edit PHP settings. We will show you both methods but we recommend using a simple WordPress plugin to edit PHP settings.
Let’s edit PHP settings from cPanel:
Login you You cPanel. Find the software section and Click “MultiPHP INI Editor”.
Then select Your domain name. And You will get many options for PHP settings you can change.
You can see the option “memory_limit” and update its value. At last click apply Button.
You can update many more settings from here. Like. max_execution_time, max_input_time, post_max_size, etc.
Let edit PHP settings from WordPress Plugin:
Custom PHP Settings WordPress plugin provides the service to edit PHP settings. You can edit PHP Settings using this plugin easily.
Install Custom PHP Settings plugin. After activating this plugin. Go Tools > Custom PHP Settings.
You can see an editor-like image and now you can edit custom PHP settings.
memory_limit=256M post_max_size=128M max_execution_time=300
I think You can change the WordPress memory limit now. On the other hand, You can change memory limits using WordPress constants.
Increase WordPress Memory Limits Using WordPress Constants:
WordPress has constants to update its memory limit. You can easily update the memory limit using their “WP_MEMORY_LIMIT” on wp-config.php
Connect Your FTP and edit wp-config.php to put a one line code:
define( 'WP_MEMORY_LIMIT', '64M' );
If You do this You will see your WordPress website memory limit updated. I think you already know “How to increase WordPress memory limits”.
WordPress has an in-built option to check website health and server status or others. Just go Tools > Site Health and click the Info tab. Scroll down and click the “server” tab. Then You will see all the information about the server.
PHP memory limit is a common issue. A low memory limit sometimes makes an error. We hope this article will help you. If you have any problem with it. Please feel free to comment below.