Log out of WordPress admin dashboard when not in use
In this article I'll quickly discuss why you should be logging out of your WordPress admin dashboard when not in use. There can be multiple requests that your web-browser sends to the /wp-admin/admin-ajax.php script while you are logged into the WordPress admin dashboard, and leaving your computer unattended over the course of the day those requests can add up to a large amount of resource usage.
I actually just answered a ticket where a customer was having this exact issue and it unfortunately led to their account being suspended for using up over 350% of their allotted CPU resources on a shared server. So knowing just exactly what it is WordPress is doing even when you're not at your computer is important information to have to protect yourself from having the same thing happen to you.
Excessive requests for admin-ajax.php
In this example that I'm talking about these were the requests per hour that were happening from the customer's own IP address to the server:
Their requests totaled 24.335 POST requests to /wp-admin/admin-ajax.php at a rate of about 30 requests per minute. You can see around 2:00 (14:00) the requests died off as the account was suspended at that time.
By default the /wp-admin/admin-ajax.php script is used primarily by plugins so that they can continue to send information to the server from the admin dashboard regardless of you clicking on a link telling WordPress to do something.
In a lot of cases this is perfectly fine, as you might work on your WordPress site for a few hours and then move on to other things. However if you simply leave open the WordPress admin dashboard and don't close your web-browser and walk away from your computer and start doing other things, WordPress doesn't know this and so will continue to send in further requests to the server.
Editing pages and posts uses admin-ajax.php
When you're editing a WordPress page or post in your admin dashboard the admin-ajax.php script is utilized to autosave any changes. So if you're making a whole lot of edits and leaving the admin dashboard open this can add up to a large amount of resource usage on a shared server. This amount of usage would probably be negligible when on a VPS (Virtual Private Server) or dedicated server.
Heavy admin-ajax.php usage plugins
There are several know WordPress plugins that use the /wp-admin/admin-ajax.php script pretty extensively to facilitate their function. It would be recommended to be on at least a VPS (Virtual Private Server) and even better to be on a dedicated server if you are consistently using these plugins for long periods of time throughout the day:
We will add to this list as we discover more intensive plugins, please also use the Your Opinion Matters to the top-right to let us know about any other WordPress plugins you might have had resource usage issues with.
The best sure way to ensure these type of problems don't happen for you is being sure to logout of the WordPress admin dashboard, and to also close out your web-browser to be 100% sure that all requests from your computer to the server have ceased.
Support Center LoginOur Login page has moved, Click the button below to be taken to the login page.
Social Media Login
2014-07-26 9:07 pm
Do I need to click Log Out from the dashboard, or is it still ok if I close the browser Tab?
2014-07-28 9:40 am
Thank you for your great Wordpress Log out question. It is fine to close the browser tab, when you are finished working in Wordpress. Your computer should not continue to send requests to the server.
Keep in mind that you will typically remain logged into Wordpress, until you actually click the Log Out link. So if you are on a public computer, it is safer to actually log out.
If you have any further questions, feel free to post them below.
2017-02-05 3:58 pm
Whenever I make changes to my wordpress website and then click on home icone(Web link) to check my website, it kicks me out of dashboard. Could you please help me with this.
2017-02-05 6:31 pm
Try clearing your web browser cache. It sounds like there might be an issue with a cookie that's set in WordPress.