'Wordpress PHP memory limit is -1
While checking my wordpress site, I have realised that on site health both "PHP memory limit" and "Max input time" are shown as "-1". If I am not mistaken this would mean that it can use all the PHP memory it wants to. Nonetheless, I have not set this memory limit, and when trying to set it in the wp-config file as 40MB, which is the standard, the value does not change. I have checked and I have no php.ini file nor .htaccess defining this value.
Solution 1:[1]
If your website is on a live server, log into cpanel (assuming that is what you're using). Look for php selector or multi-php editor, You should see the option to edit memory limit and Max input time.
If you don't see php selector or multi-php editor, then you'll have to contact your host to edit it for you.
Solution 2:[2]
A. Please follow the process:
- Add test.php file in a route where wp-config.php existing.
- Add function phpinfo() in that test.php file with php definition tags.
- Check this test file from the website Or server path. Example: Server Path: https:\www.example.com\test.php Or localhost path http::\localhost\wordpress_folder\test.php
- Here all information available related to your php server. You can check the file php.ini there.
B. You can also add this function into wp-config: define('WP_MEMORY_LIMIT', '256M');
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Akeellis |
| Solution 2 |
