Xadka xusuusta ee WordPress

tl;dr: Gacanta u deji qiimaha ama qiimaha caadiga ah ee WP_MEMORY_LIMIT/WP_MAX_MEMORY_LIMIT wax saamayn ah kuma yeelan haddii WP_MEMORY_LIMIT/WP_MAX_MEMORY_LIMIT in ka yar ama la mid ah xadka xusuusta ee PHP (wixii ka dambeeya memory_limit loo yaqaan) waa. Waxa loo isticmaalaa in lagu dejiyo qiimayaal aad u hooseeya memory_limit si firfircoon ugu yaraan lagu taliyey.


  • Joogtada ah WP_MEMORY_LIMIT ikhtiyaar ahaan u geli kara wp-config.php leh define('WP_MEMORY_LIMIT', 'XXXM'); la dhigo.
  • Joogtada ah WP_MAX_MEMORY_LIMIT ikhtiyaar ahaan u geli kara wp-config.php leh define('WP_MAX_MEMORY_LIMIT', 'XXXM'); la dhigo.
  • Waa WP_MEMORY_LIMIT aan la dejin, waxay khusaysaa qiimaheeda caadiga ah:
    • memory_limit, la siiyay qiimaha memory_limit si firfircoon looma beddeli karo,
    • 64 MB haddii ay tahay goob badan,
    • 40MB haddii kale.
  • Waa WP_MAX_MEMORY_LIMIT aan la dejin, waxay khusaysaa qiimaheeda caadiga ah:
    • memory_limit, la siiyay qiimaha memory_limit ma aha mid isbedeli kara ama haddii ay tahay mid aan xad lahayn (-1) ama ka weyn ama la mid ah 256 MB,
    • 256 MB haddii kale.
  • Qiimaha caadiga ah ayaa kor loo qaaday mar kale iyo mar hore.
  • WP_MEMORY_LIMIT bedelay meel kasta iyadoo la isticmaalayo shaqada ini_set() firfircoon memory_limit, haddii WP_MEMORY_LIMIT ka weyn kan hadda jira memory_limit ama goorma WP_MEMORY_LIMIT waa aan xad lahayn (-1).
  • WP_MAX_MEMORY_LIMIT bedelay dhabarka dambe (si sax ah: mar kasta oo shaqada wp_raise_memory_limit() loogu yeero xaalado kala duwan [admin, image]) adoo isticmaalaya shaqada ini_set() firfircoon memory_limit, haddii WP_MAX_MEMORY_LIMIT ka weyn kan hadda jira memory_limit ama goorma WP_MAX_MEMORY_LIMIT waa aan xad lahayn (-1).
  • Macquulka ah ee WP_MAX_MEMORY_LIMIT orda ka dib macquulka ah ee WP_MEMORY_LIMIT, sidaas darteed WP_MEMORY_LIMIT xagga hore iyo WP_MAX_MEMORY_LIMIT waxay ka dhaqan galaysaa dhabarka dambe.
  • Inta badan caqli-galnimada kor lagu sheegay ayaa shaqaynaysa wp_initial_constants() (/wp-includes/default-constants.php) sida ku jirta wp_raise_memory_limit() (/wp-includes/functions.php) halkii.
  • Qiimaha memory_limit = XXXM gudaha php.ini Ayaa lagu qeexaa memory_limit (ka dib markii dib loo bilaabo adeegga shabakadda).
  • Qiimaha php_value memory_limit XXXM gudaha .htaccess Ayaa lagu qeexaa memory_limit dhammaan faylasha PHP ee ku jira galka ama galka hoose ee ay ku jiraan .htaccess ku yaal.
  • Adeegaha shabakadu wuxuu ka hortagi karaa qiimaha xadka xusuusta in lagu beddelo ini_set() ama in uu dhaafo qiime cayiman (eeg php_admin_value ).
  • memory_limit khusaysaa hab kasta: Korodhka memory_limit karaa sababa in tirada codsiyada PHP ee barbar socda ay hoos u dhacdo. Markaa qiimaha waa in si taxadar leh loo doortaa (256 MB, xaalado gaar ah 512 MB).
  • Dhabarka dambe ee WordPress ee hoos yimaada Qalabka> Gobolka Website, qiyamka memory_limit (Qaybta: Server), iyo sidoo kale ka WP_MEMORY_LIMIT iyo WP_MAX_MEMORY_LIMIT (qaybta joogtada ah ee WordPress) waa la akhrin karaa.
Dib u laabo