1. Home
  2. WordPress Management
  3. How to Increase PHP Memory Limits for WordPress

How to Increase PHP Memory Limits for WordPress

Overview

This guide explains how to check and increase the PHP memory limit for your WordPress installation on WPCloud. Generally, most WordPress installations work efficiently with our default settings. However, if you need to increase your memory allocation for specific plugins or operations, this guide will show you how.


Understanding Your Container Resources

Every WordPress installation on WPCloud runs in its own isolated container with dedicated resources. By default, we allocate 1 gigabyte (1GB) of RAM to each container. This isolation ensures that one website’s performance cannot impact another.

Your container’s RAM is used by several critical components:

  • PHP processes for running WordPress
  • MySQL database queries
  • LiteSpeed web server operations
  • Caching systems (LSCache, Memcached)
  • Background tasks and cron jobs
  • Plugin and theme operations

This explains why a seemingly simple WordPress site might need significant RAM – it’s not just WordPress itself, but all these supporting services working together to keep your site fast and responsive.
If your website requires additional RAM beyond the default 1GB allocation, please contact WPCloud support for pricing on additional resources. Our team can analyze your site’s resource usage and recommend the appropriate upgrade package to ensure optimal performance.


Prerequisites

  • Active WPCloud hosting account
  • cPanel access credentials
  • Basic understanding of WordPress file structure (for manual method)

Method 1: Checking Current Memory Allocation

  1. Access PHP Selector
    • Log in to your cPanel account
    • Scroll to the “Software” section
    • Click on “Select PHP Version”
    [Insert Image]
  2. View Current Memory Settings
    • In PHP Selector, click on “Switch to PHP Options”
    • Look for “memory_limit” setting
    • Default value should show 512M
    [Insert Image]

Method 2: Manual Configuration via wp-config.php

  1. Access wp-config.php
    • Connect to your site via File Manager in cPanel
    • Navigate to your WordPress root directory
    • Locate wp-config.php
    [Visual Aid Suggestion: Screenshot of File Manager showing wp-config.php location]
  2. Add Memory Limit Definitions
    • Add these lines before the “/* That’s all, stop editing! */” comment:
    define('WP_MEMORY_LIMIT', '512M'); define('WP_MAX_MEMORY_LIMIT', '512M'); [Insert Image]
  3. Save Changes
    • Click “Save Changes” in File Manager
    • Clear your browser cache

The simplest and safest method is to contact WPCloud support:

  1. Open a support ticket or email support@wpcloud.ca
  2. Request the desired memory limit increase
  3. Support team will implement the change server-side
  4. No technical knowledge required

Common Issues and Solutions

  • Issue: Memory size exhaustion errors in error logs
    Example error:PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 20971520 bytes) in /home/username/public_html/wp-includes/plugin.php on line XXXSolution: This error indicates your WordPress installation needs more memory allocation. You can:
    1. Follow the steps in this article to increase the memory limit, or
    2. Simply contact WPCloud support, and we’ll handle the memory allocation adjustment for you
  • Issue: Unable to access PHP Selector
    Solution: Contact WPCloud support for assistance. This is typically a permissions-related issue that our team can quickly resolve.

Best Practices

  1. Monitor Resource Usage
    • Regularly check your site’s memory usage through cPanel metrics
    • Watch for memory-related errors in error logs
  2. Optimize First
    • Before requesting more memory, consider:
      • Deactivating unused plugins
      • Cleaning up post revisions
  3. Security Considerations
    • While it’s good practice to be cautious with configuration changes, WPCloud maintains 30 days of backups for all files, including wp-config.php
    • Keep track of memory limit modifications

When to Contact Support

Contact WPCloud support immediately if you:

  • Are unsure about making configuration changes
  • Need immediate memory limit adjustments
  • Experience persistent memory-related errors
  • Need guidance on optimal memory allocation

Support Options

For assistance with memory limit adjustments:

  • Submit a support ticket through the client portal
  • Email support@wpcloud.ca
  • Typical response time: Within 15 minutes

Note: WPCloud support team is available 24/7/365 and can implement these changes quickly and safely on your behalf.

Updated on October 15, 2025
Was this article helpful?

Related Articles