Skip to content
Coupons 8

You have not saved any offers or providers yet. Tap the bookmark on an offer or choose Save on a provider profile.

    Monitoring free

    What is the PHP Memory Limit and how can it be changed?

    php-memory-limit-changePHP is a programming language that provides optimal conditions for web applications. It is used by almost all Content Management Systems (CMS) such as TYPO3, WordPress, Joomla, or Contao, and by e-commerce platforms like Shopware and Magento. Essential settings are stored in a central configuration file called php.ini, which can often be edited through the CMS or directly via a text editor. An important parameter in this file is the PHP Memory Limit.

    What exactly is the PHP Memory Limit and how can it be adjusted individually is explained in the following article:

    How does PHP work?

    PHP belongs to the so-called scripting languages. This means that programs are written as easily understandable code. Subsequently, an interpreter takes over the processing by reading a program line by line and executing the instructions according to its php.ini. CMS such as Magento, WordPress, or Joomla consist of a variety of scripts, each performing a specific task. They are loaded into a specific area of the memory, which is limited by the PHP Memory Limit and can be increased individually. The PHP scripts are used to create a webpage in HTML format from various sources such as a database, external files, and special style sheets - the css files. This is complemented by client-side scripts written in other languages like Java or JavaScript, enabling interactive features such as games or animated menus. Suitable web hosting packages with PHP support can be found in the PHP Web Hosting Comparison.

    What is the PHP Memory Limit and what is its purpose?

    As mentioned earlier, PHP reserves a portion of the memory to store and execute scripts. The size of this area is defined by the PHP Memory Limit in the php.ini. The limitation imposed by the PHP Memory Limit protects a computer from being affected in its performance by poor or faulty programming. A simple example of this would be a loop that creates and stores a variable whose name and value increase by 1 with each iteration. Without a PHP Memory Limit in the php.ini, this would lead to the entire memory being occupied by this one loop over time. As a result, the loading times increase, and in some cases, the operating system itself may become unstable due to a lack of memory for its data.

    How high should a PHP Memory Limit be in production operation?

    In web hosting, the standard size of the PHP Memory Limit is usually between 32 MB and 64 MB. This is sufficient for the basic installation of a CMS like WordPress, Contao, Joomla, or TYPO3 and allows for stable operation. Complex plugins, large databases, or many extensions require more memory for the scripts and their data. In this case, instead of a webpage, PHP outputs an error message, which may state the following:

    In this case, it is necessary to increase the PHP Memory Limit so that the interpreter has sufficient temporary memory available for the execution of all scripts. Recommended limits for a CMS range between 32 MB (WordPress) and 256 MB (Shopware) - more than 512 MB are rarely necessary and often indicate programming issues.

     

    Find web hosting here with at least 128MB PHP Memory Limit:

     

    10 from 119 Offers* Last Updated: 04/11/2026

    Back to the Web Hosting comparison

    Sponsored
    Web Hosting Plus

    Loading details…

    97% Recommendation

    Server location

    Diamond
    Sponsored
    • 200 GB Storage Space
    • 1 Domains included
    2 Mailboxes
    250 Databases
    For up to 10 web projects
    SSL certificate incl.

    Loading details…

    £1.00*

    Average price per month

    £9.00/Month

    Contract term: 12 Months

    Price details
    Monthly price £9.00
    Offer price (12 months) £1.00
    Setup fee Free
    Contract term 12 Months
    Avg. price/month £1.00
    Cost 12 months £12.00
    Cost 24 months £120.00
    To provider *
    Deals 2
    • Save 90% on Web Hosting Web Hosting Plus Save 90% £12/month £1.20 /month for 12 months Then ...
    • Save 91% on WordPress Hosting WordPress Hosting Grow Save 91% £1.20 /month for 12 months Then only...
    Grow

    Loading details…

    96% Recommendation

    Server location

    Diamond
    Sponsored
    • 250 GB Storage Space
    • 2 Domains included
    Money-back guarantee
    2 Mailboxes
    45 Databases
    For up to 3 web projects
    SSL certificate incl.

    Loading details…

    £0.99

    Average price per month

    £8.00/Month

    Contract term: 12 Months

    Price details
    Monthly price £8.00
    Offer price (12 months) £0.99
    Setup fee Free
    Contract term 12 Months
    Avg. price/month £0.99
    Cost 12 months £11.88
    Cost 24 months £107.88
    To provider *
    Deals 1
    • First 6 months 59p per month Web Hosting Web Hosting Grow First 6 months 59p per month then £9.60 per month (i...
    NVMe Hosting - HOSTtest Small Hosting...

    Loading details…

    100% Recommendation

    Server location

    Premium
    • 5 GB Storage Space
    • 1 Domains included
    Phone support
    Free website migration service
    Daily backup
    Managed WordPress Hosting
    15 Databases
    SSL certificate incl.
    Exclusive on hosttest

    Loading details…

    £0.60* *

    Average price per month

    £0.60/Month

    Contract term: 12 Months

    Price details
    Monthly price £0.60
    Setup fee Free
    Contract term 12 Months
    Avg. price/month £0.60
    Cost 12 months £7.16
    Cost 24 months £14.31

    The original currency is EUR

    To the offer
    Deals 1
    • CaptchaCore: 25 % Rabatt auf DSGVO-konformen Bot-Schutz – exklusiv für HOSTtest 25 % Rabatt auf CaptchaCore – exklusiv für HOSTtest-Nutzer CaptchaCor...
    Grow

    Loading details…

    96% Recommendation

    Server location

    Diamond
    • 250 GB Storage Space
    • 2 Domains included
    Money-back guarantee
    2 Mailboxes
    45 Databases
    For up to 3 web projects
    SSL certificate incl.

    Loading details…

    £0.99

    Average price per month

    £8.00/Month

    Contract term: 12 Months

    Price details
    Monthly price £8.00
    Offer price (12 months) £0.99
    Setup fee Free
    Contract term 12 Months
    Avg. price/month £0.99
    Cost 12 months £11.88
    Cost 24 months £107.88
    To provider *
    Deals 1
    • First 6 months 59p per month Web Hosting Web Hosting Grow First 6 months 59p per month then £9.60 per month (i...
    UK WordPress Hosting Business

    Loading details…

    96% Recommendation

    Server location

    Diamond
    • 25 GB Storage Space
    • 2 Domains included
    Money-back guarantee
    3 Mailboxes
    45 Databases
    For up to 2 web projects
    SSL certificate incl.

    Loading details…

    £0.99

    Average price per month

    £11.99/Month

    Contract term: 12 Months

    Price details
    Monthly price £11.99
    Offer price (12 months) £0.99
    Setup fee Free
    Contract term 12 Months
    Avg. price/month £0.99
    Cost 12 months £11.88
    Cost 24 months £155.76
    To provider *
    Deals 1
    • First 6 months 59p per month Web Hosting Web Hosting Grow First 6 months 59p per month then £9.60 per month (i...

    Tip: Choose up to 3 offers and compare them with each other.

    Web Hosting Plus

    Loading details…

    97% Recommendation

    Server location

    Diamond
    • 200 GB Storage Space
    • 1 Domains included
    2 Mailboxes
    250 Databases
    For up to 10 web projects
    SSL certificate incl.

    Loading details…

    £1.00*

    Average price per month

    £9.00/Month

    Contract term: 12 Months

    Price details
    Monthly price £9.00
    Offer price (12 months) £1.00
    Setup fee Free
    Contract term 12 Months
    Avg. price/month £1.00
    Cost 12 months £12.00
    Cost 24 months £120.00
    To provider *
    Deals 2
    • Save 90% on Web Hosting Web Hosting Plus Save 90% £12/month £1.20 /month for 12 months Then ...
    • Save 91% on WordPress Hosting WordPress Hosting Grow Save 91% £1.20 /month for 12 months Then only...
    WordPress Hosting Grow

    Loading details…

    97% Recommendation

    Server location

    Diamond
    • 50 GB Storage Space
    • - Domains included
    5 Mailboxes
    18 Databases
    For up to 10 web projects
    SSL certificate incl.

    Loading details…

    £1.00*

    Average price per month

    £10.00/Month

    Contract term: 12 Months

    Price details
    Monthly price £10.00
    Offer price (12 months) £1.00
    Setup fee Free
    Contract term 12 Months
    Avg. price/month £1.00
    Cost 12 months £12.00
    Cost 24 months £132.00
    To provider *
    Deals 2
    • Save 90% on Web Hosting Web Hosting Plus Save 90% £12/month £1.20 /month for 12 months Then ...
    • Save 91% on WordPress Hosting WordPress Hosting Grow Save 91% £1.20 /month for 12 months Then only...

    Never miss another website or server outage.

    24/7 monitoring with alerts via SMS, phone call or email with HOSTtest Plus.

    Start monitoring for free
    single web hosting (48 month)

    Loading details…

    78% Recommendation

    Server location

    Diamond
    • 10 GB Storage Space
    • 1 Domains included
    Money-back guarantee
    Free website migration service
    Managed WordPress Hosting
    1 Mailbox
    2 Databases
    For up to 1 web projects
    SSL certificate incl.

    Loading details…

    £1.49

    Average price per month

    £7.99/Month

    Contract term: 48 Months

    Price details
    Monthly price £7.99
    Offer price (48 months) £1.49
    Setup fee Free
    Contract term 48 Months
    Avg. price/month £1.49
    Cost 12 months £17.88
    Cost 24 months £35.76
    NVMe Hosting - HOSTtest Special Hosti...

    Loading details…

    100% Recommendation

    Server location

    Premium
    • 10 GB Storage Space
    • 1 Domains included
    Phone support
    Free website migration service
    Daily backup
    Managed WordPress Hosting
    15 Databases
    SSL certificate incl.
    Exclusive on hosttest

    Loading details…

    £1.38* *

    Average price per month

    £1.38/Month

    Contract term: 12 Months

    Price details
    Monthly price £1.38
    Setup fee Free
    Contract term 12 Months
    Avg. price/month £1.38
    Cost 12 months £16.53
    Cost 24 months £33.06

    The original currency is EUR

    To the offer
    Deals 1
    • CaptchaCore: 25 % Rabatt auf DSGVO-konformen Bot-Schutz – exklusiv für HOSTtest 25 % Rabatt auf CaptchaCore – exklusiv für HOSTtest-Nutzer CaptchaCor...
    Economy Starter - NVMe SSD Hosting wi...

    Loading details…

    100% Recommendation

    Server location

    Premium
    • 5 GB Storage Space
    • 1 Domains included
    Phone support
    Free website migration service
    Daily backup
    Managed WordPress Hosting
    5 Databases
    SSL certificate incl.

    Loading details…

    £1.40 *

    Average price per month

    £1.40/Month

    Contract term: 12 Months

    Price details
    Monthly price £1.40
    Setup fee Free
    Contract term 12 Months
    Avg. price/month £1.40
    Cost 12 months £16.83
    Cost 24 months £33.67

    The original currency is EUR

    To the offer
    Deals 1
    • CaptchaCore: 25 % Rabatt auf DSGVO-konformen Bot-Schutz – exklusiv für HOSTtest 25 % Rabatt auf CaptchaCore – exklusiv für HOSTtest-Nutzer CaptchaCor...
    Premium web hosting (48month)

    Loading details…

    78% Recommendation

    Server location

    Diamond
    • 20 GB Storage Space
    • - Domains included
    Money-back guarantee
    Free website migration service
    Managed WordPress Hosting
    2 Mailboxes
    300 Databases
    For up to 3 web projects
    SSL certificate incl.

    Loading details…

    £1.79

    Average price per month

    £10.99/Month

    Contract term: 48 Months

    Price details
    Monthly price £10.99
    Offer price (48 months) £1.79
    Setup fee Free
    Contract term 48 Months
    Avg. price/month £1.79
    Cost 12 months £21.48
    Cost 24 months £42.96
    Web Hosting Launch (4 years)

    Loading details…

    100% Recommendation

    Server location

    Diamond
    Free website migration service
    25 Databases
    For up to 25 web projects
    SSL certificate incl.

    Loading details…

    £1.99*

    Average price per month

    £7.99/Month

    Contract term: 48 Months

    Price details
    Monthly price £7.99
    Offer price (48 months) £1.99
    Setup fee Free
    Contract term 48 Months
    Avg. price/month £1.99
    Cost 12 months £23.88
    Cost 24 months £47.76

    * At hosttest, only a selection of providers can be found. Offers marked with an asterisk have additional conditions on the offer detail page. More information about our ranking and sorting details.

    * All prices on this page are net prices and are subject to the applicable VAT.

    * If you click on a recommendation with *, this supports our work. hosttest may then receive remuneration.

    Didn't find the right one?

    Now post an individual tender for free & without obligation and receive offers in the shortest possible time.

    Start tender

    How to Increase the PHP Memory Limit?

    Most web hosting providers allow their customers to increase the PHP Memory Limit within certain limits. There are various ways to do this, not all of which are offered by every Internet Service Provider:

    • Method 1: Changing in the php.ini File

      The php.ini file actually contains the "global" configuration of the PHP interpreter - this means that changes in the php.ini file generally apply to the entire server. However, some providers also allow the creation of an individual php.ini file where their customers can make local settings. The php.ini file consists mostly of comments that extensively and clearly document the file and its functions. It contains a section on Resource Limits, where, in addition to the maximum script execution time, the PHP Memory Limit can be increased. It is set with the entry

      memory_limit = 64M

      - here it is set to 64 MB. With a Dedicated Server or VPS Hosting, customers are free to increase the PHP Memory Limit as they wish. However, with web hosting, the provider will typically prohibit customers from changing global configurations (which also affect other users).
    • Method 2: Using a .htaccess File

      In addition to the php.ini file, the PHP Memory Limit can also be increased in a .htaccess file. This file is located in the root directory of WordPress, TYPO3, Contao, or other CMS and contains instructions that are read and applied before executing a script. The key limitation is that .htaccess is only supported by an Apache 2 web server. To increase the PHP Memory Limit, simply create a file named .htaccess with the content

      php_value memory_limit 64M
    • Method 3 (WordPress): Defining in the config.php File

      Some CMS like WordPress allow the PHP Memory Limit to be increased in their local configuration file. To do this, open the file Installation/wp-config.php (WordPress) and insert the following new definition

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

    It is important to note that every web hosting space and Internet Service Provider limits the maximum PHP Memory Limit of their customers to control memory usage. The allowable maximum limit usually varies depending on the provider, ranging between 128 and 512 MB. Server monitoring should be a must-have for professionally operating a website.

    Web hosting with at least 128MB PHP Memory Limit

    Compare offers from suitable web hosting providers now

    To Provider Comparison

    Image credit: Image by Dok Sev from Pixabay