increasing memory in php.ini or wp-config

Is it better to increase the wordpress memory usage in php.ini or wp-config? Also what is the code to increase the memory limit|?

  • Ash
    • WordPress Hacker

    Hello cornelius_butler

    It's always better to use the php.ini file. Because, some hosting has some limitations and doesn't allow overwriting the settings using php or htaccess. So, it's recommended changing the value on php.ini file.

    To change the memory limit, look for "memory_limit" in the php.ini file. Then change the value as per your requirement like 256M or 512M etc. And then you must restart the server to make the changes take any effect.

    Hope it helps! Please feel free to ask more questions if you have any.

    Have a nice day!


Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.