Modify .htaccess to Protect Your Blog

 

.htaccess file role is very big, and today I love WP to share through .htaccess file to protect the blog, to prevent blog script injection.

Simply copy the following code to complete the operation. Modifying .htaccess file, or to back up the file.

Need to add code in .htaccess:

Options +FollowSymLinks<BR>RewriteEngine On<BR>RewriteCond %{QUERY_STRING} (\< |%3C).*script.*(\>|%3E) [NC,OR]<BR>RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [ OR]<BR>RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})<BR>RewriteRule ^(.*)$ index.php [F,L]

Although the code is simple, but it is very useful.

WordPress Cleanup WP_postmeta Raiders

WP_postmeta table is stored with the information in the article, except for some specific time the data inside is useless to write the data before I also clean up the article, simply gives two statements and other data tables clean up, see WordPress database cleaning.

In several statements given below to make your WP_postmeta clean to very much.

DELETE FROM wp_postmeta WHERE meta_key = ‘_edit_lock’;
DELETE FROM wp_postmeta WHERE meta_key = ‘_edit_last’;

This is two statements before testing safe removal without risk.

DELETE FROM wp_postmeta WHERE meta_key = ‘_wp_old_slug’;
DELETE FROM wp_postmeta WHERE meta_key = ‘_revision-control’;
DELETE FROM wp_postmeta WHERE meta_value = ‘{{unknown}}’;

This is the new attempt of the three statements, the first two are not dangerous. The last one is not clear the current role, but no abnormalities after deletion. The implementation of these five sentences to delete more than 95% of the data can be considered on the limit optimization, and finally take into account the data table is not very important, cleanliness of people can try to empty the table, of course, I test empty table So that some of the original data is lost.

 

Random Articles WordPress Plugin-Advanced Random Posts

WordPress random article function is that when articles to your blog gets more and more, you must really want your old articles to bask in the Sun to see the outside world. In General, the display in sidebar WordPress random article is better. So, whether Home or contents page, to see the light of day. In fact, this WordPress plugin random articles although there are not many, but there are a few. Alas, most of them hasn’t been updated for a year or two. Comparing down, Advanced Random Posts, this plugin can display WordPress perfectly random article is relatively new, outcome are update at the end of last year. It has a feature, when you click on browse blogs when classification under WordPress Sidebar displays the random article. In addition, it is to display all categories under the WordPress random article.

Plug-in download address: http://WordPress.org/extend/plugins/advanced-random-posts

Download the WordPress plugin random articles, and after unzip, upload the plugin folder to/WP-content/plugins/folder.

After activating the plugin in the background, click the widget’s admin page in the Appearance panel and drag it to the sidebar. Fill in the number of titles and random articles (up to 20), set whether to display the current classification of WordPress random articles. In this way, the front sidebar can display a random article.