惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园 - 【当耐特】
Help Net Security
Help Net Security
P
Proofpoint News Feed
J
Java Code Geeks
爱范儿
爱范儿
Last Week in AI
Last Week in AI
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
F
Full Disclosure
Google DeepMind News
Google DeepMind News
H
Help Net Security
G
Google Developers Blog
Jina AI
Jina AI
Vercel News
Vercel News
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
L
Lohrmann on Cybersecurity
S
Schneier on Security
Microsoft Azure Blog
Microsoft Azure Blog
IT之家
IT之家
Security Archives - TechRepublic
Security Archives - TechRepublic
阮一峰的网络日志
阮一峰的网络日志
N
News and Events Feed by Topic
GbyAI
GbyAI
B
Blog
O
OpenAI News
博客园_首页
Cisco Talos Blog
Cisco Talos Blog
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Hacker News: Ask HN
Hacker News: Ask HN
TaoSecurity Blog
TaoSecurity Blog
腾讯CDC
MongoDB | Blog
MongoDB | Blog
M
MIT News - Artificial intelligence
C
Cybersecurity and Infrastructure Security Agency CISA
Cyberwarzone
Cyberwarzone
Webroot Blog
Webroot Blog
Simon Willison's Weblog
Simon Willison's Weblog
Y
Y Combinator Blog
C
Cisco Blogs
A
Arctic Wolf
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
T
The Exploit Database - CXSecurity.com
Security Latest
Security Latest
AI
AI
W
WeLiveSecurity
aimingoo的专栏
aimingoo的专栏
The Register - Security
The Register - Security
Project Zero
Project Zero
H
Hackread – Cybersecurity News, Data Breaches, AI and More
N
Netflix TechBlog - Medium
Blog — PlanetScale
Blog — PlanetScale

Meks

How Adding Slack Bot Boosted Our Culture of Appreciation 10 Best Knowledge Base & Wiki WordPress Themes 2021 How to use (and why) WordPress sitemap plugin 22 free and premium podcast software for your show [2021 edition] Digital storytelling with WordPress – an all-in-one guide to make your web stories pop! How to use WordPress autoposting plugin to improve your visibility and SEO? How to create a personal branding site? Step-by-step DIY guide Top 15 WordPress content plugins and tools to improve your visibility and rankings WCEU 2020 recap – key takeaways from the biggest online WordPress conference
How to increase WordPress Memory Limit (quick fixes)
Dusan Milovanovic · 2021-06-16 · via Meks

Here is a post about how to increase the memory limit in WordPress. Allowed memory size exhausted error message showed up in your WordPress installation? No worries – this is one of the most common errors in WordPress. You can apply an easy fix by increasing the memory limit in your PHP.

Table of Contents

  1. A quick introduction to WordPress memory errors
  2. Checking the WordPress memory limit
  3. Edit your wp-config.php file
  4. Edit your PHP.ini file
  5. Edit your .htaccess file

A quick introduction to WordPress memory errors

WordPress is one of the most stable platforms today, and most of the problems you can encounter are not so difficult to fix. Memory limit error is also known as ‘PHP memory limit error, and if it happens in your WordPress installation, it will look like this.

fatal error: allowed memory size of 67108864 bytes exhausted

This error happens in different circumstances, but the most common are:

  • When you try to install a new theme or a plugin
  • When you try to upload images or other media to your website

Your hosting provides this memory. When you buy your hosting plan, your site will get a specific amount of resources. As your site grows, you start using more complex plugins and scripts – you may hit your memory limit. Again, speaking WordPress – if you see this error, you won’t complete the action that you wanted to take.

Top WP Hosting recommended by Meks

Checking the WordPress memory limit

WordPress 5.2 introduced a pretty handy tool called “Site Health.” It is located in the WordPress dashboard’s Tools / Site Health section. To see the memory limit of your website, go to Tools / Site Health / Info and go to the Server section.

checking wordpress memory limit

This means that your server has a 128MB memory limit. If there is a memory limit error on your website, make sure that you increase this number. We will show several most efficient ways to do this.

If you are not 100% sure about what you are doing, please contact your hosting provider and ask them to increase your PHP memory limit for you.

Edit your wp-config.php file

Before editing the wp-config.php file, make sure that there is a backup of this file. Look for the “WP_MEMORY_LIMIT ” text inside wp-config. If you don’t find the WP_MEMORY_LIMIT line inside the wp-config.php file, you can paste it right before the part that says: “That’s all, stop editing! Happy publishing.”

define('WP_MEMORY_LIMIT', '256M');

If you still get the error, open the wp-config file, increase the memory limit further, re-upload the file, and see what will happen next.

Follow this link to find more info about the wp-config.php file.

Edit your PHP.ini file

If your hosting allows access to the PHP.ini file, edit it and increase the maximum amount of memory a script may consume (in this case, this is 128MB)

memory_limit = 256M ; Maximum amount of memory a script may consume (128MB)

Edit your .htaccess file

If your host doesn’t allow access to the PHP.ini file, there is a quick but not so recommended method of modifying your .htaccess file. Before editing, please make sure that you have a backup of this file, too. Add the following code to your .htaccess file.

php_value memory_limit 256M

Final thoughts

If the methods above don’t work or aren’t successful, make sure to talk to your hosting about your hosting problems and increase your memory limit. Maybe it’s the right time to test their support skills.

Got questions or like to talk? Please subscribe to our YouTube Channel for more WordPress tutorials. You can also find us on Twitter and Facebook.

Tags: , ,