WordPress could get very slow if used without limitations or protection. I wrote about Nginx HttpLimitReqModule and HttpLimitZoneModule a while ago which could be customised as following to protect WordPress blog.
http{
....
geo $limited {
default 1;
127.0.0.1 0;
}
map $limited $limit {
1 $binary_remote_addr;
0 "";
}
#http://wiki.nginx.org/HttpLimitConnModule
#concurrent connections limited to 200
limit_conn_zone $limit zone=concurrent:10m;
limit_conn_log_level warn;
limit_conn concurrent 200;
#http://wiki.nginx.org/HttpLimitReqModule
#PHP serve zone to limit requests to 50 per second
limit_req_zone $limit zone=php:10m rate=50r/s;
#limit searches to 100 request per minute
limit_req_zone $limit zone=search:10m rate=100r/m;
#login zone to limit login request to 1 request per second
limit_req_zone $limit zone=login:10m rate=1r/s;
limit_req_log_level warn;
server {
.....
error_page 449 = @search;
#limit search requests
if ( $arg_s ){
return 449;
}
location @search {
limit_req zone=search nodelay;
rewrite / /index.php?$args last;
include /etc/nginx/fastcgi_params;
}
location = /wp-login.php {
limit_req zone=login nodelay;
include /etc/nginx/fastcgi_params;
}
location ~ \.php$ {
limit_req zone=php burst=50;
include /etc/nginx/fastcgi_params;
}
Ozh’ Tweet Archiver is a WordPress plugin that can archive your tweets on your own blog; it simply creates a new post for each tweet. Additionally, it offers converting hashtags to WordPress tags, and several other features. Nevertheless, one feature, I thought might be interesting, is to process the links on tweets and show them as a Facebook feed. Recently, I modified the code and it worked very well on my blog: Gadelkareem Tweets.
– All we need is to modify the “wp-content/plugins/ozh-tweet-archiver/inc/import.php” file as following:
I recently installed Disqus plugin for WordPress; however, I have been receiving this message “unable to connect to the disqus api servers.” By looking into the source code, it looks like curl is the problem! more specifically the _dsq_curl_urlopen() function, but I did not investigate this error further. As fortunately, we can easily switch to the alternative function _dsq_fsockopen_urlopen().
Install Sphinx 2.0.4 on CentOS 6.2
– Make sure to check CentOS, PHP-FPM, Nginx, memcached and MYSQL posts.
– Get fresh RPM from sphinxsearch.com
– Install Sphinx
– Create sample MySQL database