When you've built your website using the popular WordPress platform, it can make running and maintaining a website a lot easier than manually doing it. But some of that ease and automation can also cause excessive resource usage if you're not careful.
With the way that WordPress functions, there are a lot of things that it does on its own because a wide array of people might be trying to build their site with it.
There are things you can do to help ensure that your WordPress install is streamlined, and optimized to load the fastest that it can, while also reducing your account's usage demands for running WordPress.
By default every visitor that comes to your WordPress website will require the server to run a PHP script to pull your page or post data from the database.
You can utilize a WordPress caching plugin to reduce the amount of redundant and duplicate database calls to display your site.
WP Super Cache (Easier to setup, more basic)
W3 Total Cache (More advanced caching options)
One of the great features of WordPress is that you can extend its capabilities by using plugins. However some plugins are known to be more intensive than others, and if you run these on a medium to high traffic WordPress website you could run into issues:
When you're logged into the WordPress admin dashboard it continually sends requests to the server. So if you're stepping away from your computer, or not directly working on your WordPress website, log out of the admin dashboard and close out any tabs with it open to cut down on your usage. Click here for more detailed information on why you should log out of the dashboard.
WordPress tries to schedule its own activities using a wp-cron.php script. Unfortunately this script gets called everytime a visitor comes to your site and can cause high usage over the day.
You'll want to setup a cron job to call the wp-cron.php script at a more appropiate interval, something like every 4-6 hours works well.
0 */6 * * * cd /home/userna5/public_html; php -q wp-cron.php
Then you'll want to open up your wp-config.php file and add the following entry to it to disable the default wp-cron from running:
/** The Database Collate type. Don't change this if in doubt. */ define('DB_COLLATE', ''); define('DISABLE_WP_CRON', 'true');
Use a robots.txt file to control the rate at which search engines crawl your website, and what files they are allowed to index.
If you have certain User-Agents hitting your WordPress site and causing excessive usage, you can force these users to a 403 Access Denied page by placing rules in your .htaccess rules file.
The below rule for instance would block any user that had the word Baiduspider, HTTrack, or Yandex in their User-Agent.
RewriteEngine On RewriteCond %{HTTP_USER_AGENT} ^.*(Baiduspider|HTTrack|Yandex).*$ [NC] RewriteRule .* - [R=403,L]
If know you do not have customers in some regions of the world, you can disallow specific countries from having access to your site using your .htaccess file.
Using the WP-reCAPTCHA plugin can greatly reduce the amount of comment spam your site is getting. Just turning comments off when they are not necessary can also help you avoid having to deal with a large amount of unwanted comments as well.
When you update Wordpress, Wordpress plugins, or Wordpress themes, it ensures you are running the latest features and fixes to bugs that have been found. You can update Wordpress from the Admin dashboard, or Softaculous. Here is a guide on updating Wordpress plugins.
Optimizing your WordPress database is a good idea for any site to ensure that your performance stays high and your sever loads stay low.
This is by no means an exhaustive list of what you can do to reduce the usage from WordPress, but these are some of the most common problems we see from WordPress users and it should hopefully be enough to keep your WordPress site running smoothly.
n/a Points
|
2014-09-04 3:55 am
Thank you! Easy to understand and clear on what I should do / not do.
|
Email: | support@WebHostingHub.com | Ticket: | Submit a Support Ticket |
---|---|---|---|
Call: |
877-595-4HUB (4482) 757-416-6627 (Intl.) |
Chat: | Click To Chat Now |
We value your feedback!
There is a step or detail missing from the instructions.
The information is incorrect or out-of-date.
It does not resolve the question/problem I have.
new! - Enter your name and email address above and we will post your feedback in the comments on this page!