To increase the PHP memory limit, you can follow these steps:
1. Edit the php.ini File: Locate your server’s php.ini
file. Add or update the line memory_limit = 256M
(adjust the value as needed). Save and upload the file.
2. Use the .htaccess File: If you don’t have access to php.ini
, add this line to your .htaccess
file: php_value memory_limit 256M
.
3. Update wp-config.php (for WordPress): Add the following line to your WordPress wp-config.php
file before the "That's all, stop editing" comment:
define('WP_MEMORY_LIMIT', '256M');
Be sure to check with your hosting provider for any restrictions or recommended limits before making these changes. Some providers may enforce server-wide limits that override your settings.