Friday 7 November 2014

Why my wordpress site is slow and how to avoid it

I have been working in a WordPress project for a while and it is having too many data and comments from users. May be some 4000 posts and 30000 comments, day by day the site became shaky and it took lot of time to get loaded.

But i used the clean WordPress formats and codes, so i don't need to bother about any custom code issues. 

Note: PLEASE DO NOT CUSTOM CODE anything in the WordPress default file or write any unwanted SQL queries. Unwanted files and SQL queries will took time for the site to get loaded.

But there is something that makes the site to get loaded very slow. Actually i am just loading 10 posts in the home page and every other pages of the site is loading only 10 posts per page.

Mine is a WINDOWS / MYSQL server and it is easy for me to check any TEMP and CACHE values. While looked into my windows temp folder it loading with many 100+ PHP-CGI.exe files created for every minute, so i used a good cache plugin to cache the files and reduced the EXE file generation.

Note by default the Cache files will be get deleted on some time period (2 HRS, 4 HRS) and mine is 2 hrs.

But this does not actually reduced my page load problem and some time i got MYSQL server is overloaded something, and again i checked my TEMP folder and it showed it is stored some SESSION values for 1KB, the reason is i am using plugins (SI Captcha, Ninja Forms and YII poll) 

Inside these plugins there are code lines to generate Session values and we know all the session values will be get stored in our server, for every second the TEMP session files are getting generating. For a second i got some 5 files got generated, so i deleted these plugins and i got the site came in normal. So the problem is too many session files and php exe files.

Note: While creating any WordPress project DON'T CREATE TOO MANY SESSION values, as all will get stored in your server. And while using any plugin please check whether this is creating any session values.

My Wordpress site is very big so i did all, if you are not having that much traffic then no problem.

 



2 comments: