Focus on cloud service provider activities
Notes on website operation and maintenance

How to solve the problem that WordPress occupies too much resources and causes the host company to suspend its account

Whether we choose a virtual host or VPS host when building a website, do we encounter the host company's overload of CPU resources Suspend account What about? I believe that many friends have encountered such things as Lao Zuo. Because there is generally no limit on the number of sites to be built in overseas hosts, we will try our best to build as many sites as possible to spread the cost of building a site. Some individual webmasters even use this kind of space to split small spaces for sale.

Most webmasters will use wordpress program to build websites. WP is easy to use, but its congenital defects in resources have not been solved, which is why Lao Zuo said earlier“ Discuss how 512M VPS can run several WordPress programs "Concerns. If our WordPress website is well optimized, the number of websites can also be increased. If the optimization is not good, even if our VPS is a 1G memory solution, we cannot place many websites.

Today, after one of my ixwebhosting host accounts was suspended, the official list of resources occupied by each website was given to me. I have placed 13 WP blog websites in the IX host of the infinite 15 independent IP scheme, which can also be placed in theory. The official listed the solutions to this problem in the notice letter. There are 6 points in total. Lao Zuo sorted them out and shared with you. We can refer to and use them in our own WP site optimization.

First, make sure that the plug-ins and themes we use are up to date.

Because when using WordPress themes and plug-ins, especially plug-ins, there will be new versions. The new version will take into account the security of plug-ins and the energy consumption of resources. We need to upgrade to the latest version, which can be manually upgraded with a prompt in the background.

Second, limit the timing function of wp-cron.php.

In the official information provided by ixwebhosting, we can see that wp-cron.php occupies a large amount of resources, which may be related to the batch update and regular release of our stations. This is very resource consuming. We need to limit it in the wp-config.php file.

define('DISABLE_WP_CRON', true);

Third, limit automatic saving and copying of data.

We are in editing or non editing status. By default, WP will automatically save drafts and copies to us and add them to the database. If you don't believe it, go to the POST data table to see if there are many records, but our articles don't have so many. This is automatic addition. We need to limit the automatic version and save drafts automatically.

define ('WP_POST_REVISIONS', 0);
define('AUTOSAVE_INTERVAL', 600);

Fourthly, limit the spiders' crawling in the robots.txt file. The case file is as follows:

User-agent: *
Crawl-delay: 10
Allow: /wp-content/uploads/
Disallow: /cgi-bin/
Disallow: /wp-login.php
Disallow: /wp-login.php*
Disallow: /wp-register.php
Disallow: /wp-register.php*
Disallow: /xmlrpc.php
Disallow: /template.html
Disallow: /wp-admin/
Disallow: /wp-includes/
Disallow: /wp-content/plugins
Disallow: /wp-content/themes
Disallow: /page/
Sitemap: https://www.laozuo.org/sitemap.xml
Sitemap: https://www.laozuo.org/sitemap.xml.gz

Fifth, it is prohibited to use plug-ins that occupy too much resources.

Some plug-ins that occupy too much resources cannot be used, especially in our website group. In order to save resources and reduce costs, we should pay special attention. Other sites can be considered. All in One SEO, Broken Link Checker, Yet Another Related Posts Plugin, and NextGen Gallery are not allowed to be used, nor are some random article plug-ins.

Sixth, delete unnecessary plug-ins.

We need to update the plug-in in use to the latest version, ensure the best version runs, and delete the plug-in that is not in use. Don't think that if you don't use it, it will occupy resources. For database optimization, we can use the Optimize Db and WP super cache auto cache plug-ins.

In a word, the above six points are basically the whole tutorial, which can solve the problem that WordPress occupies too much resources. We need to pay attention to this problem. Don't wait for the account to be sealed before solving the problem, because some hosting companies will not be restored or refunded after being suspended for more than a few times.

Domain name host preferential information push QQ group: six hundred and twenty-seven million seven hundred and seventy-five thousand four hundred and seventy-seven Get preferential promotion from merchants.
Like( zero )
Do not reprint without permission: Lao Zuo's Notes » How to solve the problem that WordPress occupies too much resources and causes the host company to suspend its account


Scan the code to follow the official account

Get more news about webmaster circle!
Entrepreneurship, operation and new knowledge