Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. WordPress (Developer)
  3. WordPress & PHP memory-related notes

WordPress & PHP memory-related notes

Scheduled Pinned Locked Moved WordPress (Developer)
1 Posts 1 Posters 300 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • d19dotcaD Offline
    d19dotcaD Offline
    d19dotca
    wrote on last edited by d19dotca
    #1

    I was recently experimenting a bit with php.ini settings and memory constants in the wp-config.php. Here is what I learned which I had found confusing before, so wanting to share this in case anyone didn't know this already:

    When looking at the Tools > Site Health > Info page in WordPress...

    • The PHP memory limit value (under Server tab) comes from the memory_limit set in the php.ini file.
    • The WP_MAX_MEMORY_LIMIT value (under WordPress Constants tab) also comes from the memory_limit set in the php.ini file when the WP_MAX_MEMORY_LIMIT isn't also defined in the wp-config.php file. ​If the WP_MAX_MEMORY_LIMIT is defined in the wp-config.php file, then this overrides the memory_limit parameter set in the php.ini file.
    • The WP_MEMORY_LIMIT value (under WordPress Constants tab) comes from the WP_MEMORY_LIMIT defined in the wp-config.php file (this is hard-coded). If not defined, it defaults to 40M.

    I would recommend increasing WP_MEMORY_LIMIT closer to the overall app memory limit by adding something like this to your wp-config.php file: define( 'WP_MEMORY_LIMIT', '2G' ); for a 2 GB memory limit to WordPress for example.

    I had found it confusing earlier as to where each parameter was defined and how it was set (and what the defaults are). Hopefully this helps others for the future too.

    --
    Dustin Dauncey
    www.d19.ca

    1 Reply Last reply
    4
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Bookmarks
    • Search