The "Fatal Error: Allowed Memory Size of Bytes Exhausted" in WordPress occurs when your website consumes more PHP memory than what is allowed by your server's configuration. This can lead to a white screen or an error message and render your website inaccessible. To fix this error, you'll need to increase the PHP memory limit. Here's how you can do it:
Option 1: Edit the wp-config.php File
-
Access Your Website's Files:
- Use an FTP client like FileZilla or access your website's file manager via your hosting control panel.
-
Locate the wp-config.php File:
- The wp-config.php file is typically located in the root directory of your WordPress installation.
-
Edit the wp-config.php File:
- Right-click on wp-config.php and choose to edit it with a text editor.
-
Increase the Memory Limit:
- Add the following line of code just before the line that says "That's all, stop editing! Happy blogging.":
define('WP_MEMORY_LIMIT', '256M');
You can adjust the value '256M' to a higher amount if needed, depending on your website's requirements and server capabilities.
-
Save the File:
- Save the changes to wp-config.php and upload it back to your server if you downloaded it through FTP.
-
Check Your Website:
- Visit your WordPress website to see if the error is resolved. Your site should now load without memory-related issues.
Option 2: Edit the php.ini File
If you have access to your server's php.ini file (not all hosting environments provide this access), you can increase the memory limit by editing it:
-
Locate the php.ini file on your server (usually in the root directory).
-
Open php.ini with a text editor.
-
Search for the line that sets the memory_limit parameter. It will look like this:
memory_limit = 128M
-
Increase the memory_limit value, for example, to '256M'.
-
Save the php.ini file.
After making any of these changes, your WordPress website should have an increased PHP memory limit, and the "Allowed Memory Size Exhausted" error should be resolved. If you're unsure about making these changes yourself, consider seeking assistance from a developer or your hosting provider's support team.
If your looking to setup a new account or to transfer your existing WordPress Web Hosting Ozzietel offers WordPress Web hosting.