How to Increase the WordPress Memory Limit on Hostinger
Learn how to increase WordPress memory allocation through Hostinger hPanel and wp-config.php. Check your current PHP memory limit, fix memory exhausted errors, and verify that your new settings are working.
If your WordPress website displays an error such as "Allowed memory size exhausted" or stops working while editing pages, uploading media, or running plugins, it may not have enough PHP memory available for that operation.
WordPress uses PHP to process website requests, run themes and plugins, and communicate with the database. When a script tries to use more memory than the allowed limit, PHP may stop its execution and display an error.
Hostinger provides PHP Configuration settings that let you manage the memory limit available to your hosting account. You can also adjust WordPress memory requests through the wp-config.php file, subject to the server's PHP limit.
Before you begin: Back up your WordPress files and database. Remember that increasing the WordPress memory setting does not automatically increase the maximum PHP memory limit allowed by your hosting plan.
1. What Is the WordPress Memory Limit?
The WordPress memory limit is the amount of PHP memory that WordPress requests for its operations. It helps determine how much memory scripts can use while processing website requests.
For example, when you edit a page using a page builder, process an image, import content, or run a plugin, WordPress may need additional memory to complete the task.
WordPress memory limit vs PHP memory limit
These two settings are related, but they are not the same.
| Setting | What It Controls | Where It Is Managed |
|---|---|---|
| PHP memory_limit | The maximum memory a PHP script is allowed to allocate. | Hostinger PHP Configuration or server-level PHP settings. |
| WP_MEMORY_LIMIT | The memory limit WordPress requests for normal website operations. | WordPress wp-config.php. |
| WP_MAX_MEMORY_LIMIT | A higher memory limit WordPress requests for certain administrative tasks. | WordPress wp-config.php. |
For example, if your hosting plan allows PHP scripts to use a maximum of 256 MB, setting WP_MEMORY_LIMIT to 512 MB does not automatically give WordPress 512 MB. The server-level limit still applies.
Remember: PHP memory limit is not the same as the physical RAM allocated to the hosting server. It is a per-script PHP memory restriction, not a measurement of all the server's available memory.
2. Why Does the WordPress Memory Exhausted Error Appear?
WordPress may need more memory as your website grows. A theme, plugin, or particular operation can consume more memory than the current limit allows.
Common causes of high memory usage
Too many resource-intensive plugins
Some plugins perform complex operations, process large amounts of data, or load additional libraries. Multiple resource-intensive plugins can increase memory consumption.
Page builders and advanced themes
Visual page builders, complex themes, and websites with many design elements may require additional memory during editing and rendering.
Large media processing tasks
Image resizing, thumbnail generation, and media imports can require more memory, especially when processing large files or multiple images.
WooCommerce and other complex applications
Online stores, membership websites, multilingual plugins, and import/export tools may require more memory for certain operations.
Outdated or inefficient code
A poorly optimized plugin, theme, or custom function may consume excessive memory. Increasing the limit can sometimes hide the underlying problem instead of fixing it.
Common memory error messages
You may see messages similar to these:
The numbers in the message represent memory amounts in bytes. The exact wording and values depend on the PHP configuration and the operation that failed.
3. What WordPress Memory Limit Should You Use?
The right memory limit depends on your website's plugins, theme, features, and workload. A simple blog may need less memory than a WooCommerce store or a website using a complex page builder.
The following values are general starting points, not guaranteed requirements or limits available on every Hostinger plan.
| Website Type | Suggested Starting Point | Considerations |
|---|---|---|
| Small WordPress blog | 128 MB | May be sufficient for a simple theme and a small plugin set. |
| Business website | 256 MB | Useful starting point for websites with several plugins. |
| Page builder website | 256 MB | Check the builder's own requirements and editing workload. |
| WooCommerce or resource-intensive website | 512 MB, if supported and needed | Monitor actual usage and hosting resource restrictions. |
WordPress normally requests 40 MB for a standard single-site installation and 64 MB for Multisite, but the actual memory available depends on the PHP environment. Some hosting providers configure a higher limit.
Do not increase memory unnecessarily. A higher limit does not automatically make your website faster. If a plugin or script uses excessive memory, investigate the cause instead of repeatedly increasing the limit.
4. How to Check Your Current WordPress Memory Limit
Before changing anything, check the current PHP memory limit and the memory WordPress reports. Hostinger and WordPress provide different ways to inspect these values.
Method 1: Check PHP Info in Hostinger hPanel
- Log in to your Hostinger hPanel account.
- Open Websites and select Manage site for the relevant website.
- Search for PHP Info in the dashboard sidebar.
- Open the PHP information page.
- Find the
memory_limitsetting.
This value shows the PHP memory limit configured for your hosting environment. It is not necessarily identical to the WordPress memory request.
Method 2: Check WordPress Site Health
- Log in to WordPress Admin.
- Navigate to Tools → Site Health.
- Open the Info tab.
- Expand the Server section.
- Find the PHP memory limit entry.
You can also review the WordPress environment information to understand the memory settings WordPress is using.
Method 3: Check WooCommerce system status
If your website uses WooCommerce, open WooCommerce → Status → Get system report. Review the Server environment section for PHP information and the WordPress environment section for WordPress memory details. The exact labels may vary by WooCommerce version.
5. How to Increase PHP Memory Limit in Hostinger
The first method to try is Hostinger's PHP Configuration page. It lets you change supported PHP settings through hPanel without manually editing WordPress files.
Step 1: Log in to Hostinger
Visit the Hostinger hPanel login page and sign in to your account.
Step 2: Open PHP Configuration
- Open the Websites section.
- Find the website associated with your hosting plan.
- Click Manage site or Dashboard.
- Search for PHP Configuration in the sidebar.
- Open the PHP Configuration page.
Step 3: Open PHP Options
Inside PHP Configuration, select the PHP Options tab. Find the setting named memory_limit.
Step 4: Select an available memory value
Open the dropdown menu next to memory_limit. Select the highest value available if your website needs it and your hosting plan supports it.
For example, if your account offers 256M as the maximum value, selecting it sets the PHP memory limit to that available level.
Step 5: Save the setting
Click Save or the corresponding update control shown in hPanel. Wait for the change to be applied.
Step 6: Verify the new PHP memory limit
Return to PHP Info and search for memory_limit. Confirm that the value matches the setting you selected.
Important: Hostinger sets maximum PHP memory limits according to the hosting package. If the highest available value is already selected, you may need to optimize your website or consider a plan with more resources.
6. How to Increase WordPress Memory Using wp-config.php
If you want to adjust the memory WordPress requests, you can edit the wp-config.php file. This method does not override a lower server-level PHP memory limit.
Step 1: Open Hostinger File Manager
- Log in to Hostinger hPanel.
- Open Websites and select Manage site.
- Go to Files → File Manager.
- Open the WordPress installation directory, commonly
public_html. - Locate the
wp-config.phpfile.
Step 2: Create a backup
Download a copy of wp-config.php before editing it. This file contains important WordPress configuration and database connection details.
Step 3: Open the configuration file
Right-click wp-config.php and select Edit. Look for an existing WP_MEMORY_LIMIT definition.
Step 4: Add or update WP_MEMORY_LIMIT
If the setting already exists, update its value. If it does not exist, add the following line above the stop-editing comment:
This tells WordPress to request up to 256 MB for normal website operations, subject to the PHP memory limit enforced by your hosting environment.
Step 5: Configure WP_MAX_MEMORY_LIMIT if needed
WordPress also provides WP_MAX_MEMORY_LIMIT for certain administrative operations. You can add the following setting if your website needs a higher administrative memory request:
For example, these operations may need additional memory:
- Editing complex pages in the WordPress dashboard.
- Installing or updating themes and plugins.
- Importing large amounts of website content.
- Processing large images.
Step 6: Save the file
Save your changes and close the editor. Open your website and WordPress dashboard to check whether the previous memory error has disappeared.
Do not add duplicate definitions. If WP_MEMORY_LIMIT or WP_MAX_MEMORY_LIMIT already exists, update the existing line rather than adding another one. Keep these definitions above the line that loads wp-settings.php.
7. How to Verify the New WordPress Memory Limit
After changing the PHP or WordPress memory settings, check whether the new values are actually active. WordPress may request more memory than the server permits, so verifying both settings is important.
Check through WordPress Site Health
- Open your WordPress Admin dashboard.
- Go to Tools → Site Health.
- Select the Info tab.
- Expand the Server section.
- Review the PHP memory limit and related server information.
Check through Hostinger PHP Info
Open hPanel → PHP Info and search for memory_limit. This confirms the PHP-level limit configured for the hosting environment.
Test the operation that caused the error
Repeat the action that previously triggered the memory error, such as editing a page, importing content, or processing an image. If it works without an error, the new settings may have provided enough memory for that task.
If the error continues, review your PHP and WordPress logs. The underlying issue may involve a plugin, theme, custom script, or hosting resource restriction.
8. How to Fix WordPress Memory Limit Problems
Increasing the memory limit does not solve every memory-related problem. If the error remains, use the following troubleshooting steps.
Problem 1: Hostinger does not allow a higher memory limit
Hostinger sets fixed maximum PHP memory limits for Web and Cloud hosting plans. If the highest available value is already selected, changing WP_MEMORY_LIMIT to a larger number cannot bypass that server-level restriction.
Check your hosting plan's PHP memory limit in PHP Info. If your website needs more resources than the plan provides, contact Hostinger support or consider a suitable hosting upgrade.
Problem 2: The memory error continues after increasing the limit
Check whether a particular plugin or theme is consuming excessive memory. Temporarily deactivate recently installed or updated plugins one at a time and test the operation again. Review PHP error logs to identify the component involved.
Problem 3: The website displays a critical error
A critical error may be caused by a PHP fatal error rather than the memory limit alone. Check the WordPress recovery email, debug log, and Hostinger PHP error information.
Problem 4: The website becomes slow
A higher memory limit does not automatically improve website speed. Review caching, image sizes, plugin usage, database queries, and hosting resource consumption. Remove unnecessary plugins and investigate inefficient code.
Problem 5: The website crashes during image uploads
Image processing may need additional PHP memory, but the maximum upload size is a separate setting. Check upload_max_filesize and post_max_size in PHP Configuration if the error specifically concerns upload size.
Problem 6: Changes in wp-config.php do not take effect
Check that you edited the correct WordPress installation, placed the constants before the stop-editing comment, and did not define them more than once. Confirm the PHP limit in hPanel because the server may prevent WordPress from increasing it.
Related guide: If you need to investigate PHP warnings or fatal errors, read our guide on WordPress debugging on Hostinger.
9. Frequently Asked Questions
How do I increase the WordPress memory limit on Hostinger?
Open Hostinger hPanel, go to PHP Configuration → PHP Options, and change the memory_limit value to an available higher setting. You can also adjust WordPress's memory request by adding WP_MEMORY_LIMIT to wp-config.php.
What is the recommended WordPress memory limit?
128 MB can be a starting point for a small website, while 256 MB may suit a typical business or page-builder website. Resource-intensive websites may need 512 MB or more if the hosting environment supports it. These are general guidelines, not fixed requirements.
What is the difference between WP_MEMORY_LIMIT and PHP memory_limit?
WP_MEMORY_LIMIT tells WordPress how much memory to request for normal operations. PHP memory_limit is the server-level maximum a PHP script can use. WordPress cannot exceed the limit enforced by the hosting environment.
What does WP_MAX_MEMORY_LIMIT do?
WP_MAX_MEMORY_LIMIT specifies the memory WordPress requests for certain administrative operations, such as updates and other dashboard tasks. It is separate from the normal frontend memory request.
Why does WordPress show an Allowed Memory Size Exhausted error?
The error appears when a PHP script attempts to allocate more memory than the available limit. A resource-intensive plugin, theme, image operation, import, or inefficient custom code may be responsible.
Can I set WP_MEMORY_LIMIT to 512M on Hostinger?
You can configure WordPress to request 512 MB, but it will not receive that amount if your hosting plan's PHP memory limit is lower. Check PHP Info and the available PHP Options in hPanel before selecting a value.
Does increasing WordPress memory limit make a website faster?
Not necessarily. It can help prevent memory-related failures during resource-intensive tasks, but it does not directly optimize website speed. Caching, efficient plugins, image optimization, and good code are also important.
Is PHP memory limit the same as server RAM?
No. PHP memory_limit controls how much memory an individual PHP script may allocate. Server RAM is the physical memory available to the hosting environment and may be shared among multiple processes or websites.
What should I do if Hostinger's maximum memory limit is not enough?
Investigate plugins and scripts that consume excessive memory, optimize your website, and check your hosting resource usage. If the website genuinely requires more resources, contact Hostinger support or consider a hosting plan that provides a higher PHP memory limit.
Give Your WordPress Website Enough Memory
Start by checking your current PHP memory limit in Hostinger hPanel. Increase the available value if your plan allows it, configure WordPress memory requests carefully, and test the website after saving your changes.
Open Hostinger hPanelEditorial note: PHP memory limits depend on the hosting plan and server configuration. Values entered in WordPress cannot override a lower PHP memory limit enforced by the hosting provider. Always back up your website before editing configuration files.





