Posted on July 8th, 2009 in WP Tutorial | 34,328 views

Bảo mật cho WordPressSecuring your blog is important. With WordPress so popular these days, it’s becoming a bigger and bigger target for hackers. In this post we’ll look at ten easy ways to secure your WordPress blog.

1. WP Security Scan

This very easy to use plugin will sort out some of the basic security issues with WordPress - it'll change your database's name and alert you to flaws in your installation's security, amongst other features.

Download.

2. Protect your plugins

Plugins are an easy way for a hacker to get access to your blog if they've got flaws in them. An easy way for hackers to find out which plugins you're using is to go to /wp-content/plugins/, and they'll find all the plugins that you're using. The solution? Put a blank index.html file in the wp-content/plugins/ folder.

3. Update WordPress

This is super-easy to do, but a surprising number of people don't do it: update WordPress. If you're super-security-conscious then don't upgrade to the next big release immediately (ie 2.8), wait for the bug fixes to come in (ie wait for 2.8.1).

4. Pick a good password

Common sense. Use a good password. Don't use the same password that you use on every site, create something that is easily memorable, with a mix of UPPER and lower case and some numbers in there too. Change your password regularly too.

5. Change the admin user name

By default, the WordPress user name is admin. [Lots]% of people don't change it. Why should you change it? If a hacker has your username, he's halfway there to getting into your site, he just has to guess your password. If the hacker has to guess your username as well, then that's twice as much work to do. It's super easy to migrate posts from one user to another, just create your new user and then delete the admin user. You'll be given the option to migrate posts to another user.

6. Protect your WP-Config.php file

Your WP-Config.php contains your database name, database username and database password. It's something to protect.

Just add the following code to your .htaccess file:

# protect wpconfig.php
 
order allow,deny from all

Source - Nometech.com

7. Hide your WordPress version

First off, go into your header.php file and remove the meta data (something like <meta name="generator" etc). Trouble is, WordPress adds in the meta data automatically! How do you remove it? Paste this code into your functions.php file.

<?php remove_action('wp_header', 'wp_generator'); ?>

Source - ProBlogDesign

8. Limit the number of times user can enter their password (wrongly)

The Login LockDown plugin will lock out users if they enter their password wrong too many times. You can choose how many times users can enter their password and also how long they're locked out for via a neat options page.

Download

9. Limit WP-Admin access by IP

This isn't something that I do personally, as I blog on a fair number of different computers, but if you're just on the one, with a fixed IP, then this is a great hack for you: you can restrict access to the wp-admin directory with a spluginimple .htaccess hack:

order deny, allow
allow from a.b.c.d. #your static ip
deny from all

Source - Nometech

10. Login via SSL

If your host has an SSL certificate then you can use this great little plugin to login via SSL. The Admin SSL plugin "secures login page, admin area, posts, pages - whatever you want - using Private or Shared SSL."

Download

Source: catswhocode.com

Posted on March 28th, 2009 in WP Tutorial | 49,572 views

Có một điều mà tôi tin chắc rằng hầu như bất cứ ai dùng Internet hiện nay cũng đều sử dụng qua Smilies (Emoticons) để diễn tả cảm xúc của mình, nhất là khi họ tán gẫu (chat chit) hay thảo luận trên các diễn đàn.

Ngoài nhiệm vụ thể hiện cảm xúc, smilies còn làm tăng thêm tính sinh động, hài hước cho ý kiến của bạn, bởi thế nên smilies ngày càng phổ biến, bạn vào 10 blog thì hết 8 blog có sử dụng smilies, trong đó có blog của tôi. :D

Quay lại với WordPress của chúng ta, tuy được xếp hạng ở top đầu trong số các blog platform hiện nay nhưng WordPress lại có hệ thống smilies khá ít (khoảng 22 icon) và không cho phép người dùng mở rộng thêm. Nếu đem so sánh thì bạn sẽ thấy smilies của WordPress không sinh động và đẹp mắt bằng smilies của các ứng dụng chat (IM), trong khi người dùng thì lại rất hay sử dụng smilies của IM nên có thể nói đây là một yếu điểm của WordPress vì đã không cho phép người dùng tùy biến smilies.

Nhưng không sao, vẫn có cách các bạn ạ. Sau một thời gian nghiên cứu về cách hiển thị smilies trong WordPress, tôi đã tìm ra cách khắc phục nhược điểm trên, nói đúng hơn là cách tùy biến smilies theo ý riêng mà không cần dùng đến plugin \:D/ .

Cách làm rất đơn giản, đảm bảo bạn chỉ mất khoảng 15' là xong ngay. Còn bây giờ mời bạn sang trang 2 để cùng tôi tìm hiểu tiếp nhé! :)

Pages: 1 2 3

Posted on March 4th, 2009 in WP Tutorial | 20,404 views

Là người dùng WordPress, có bao giờ bạn nghe nói đến tính năng Revision (có từ WordPress 2.6) chưa? Có thể bạn đã nghe qua ở đâu đó nhưng chưa thật sự hiểu rõ hoặc bạn không muốn tìm hiểu thì tôi khuyên bạn nên đọc bài viết này để hiểu rõ hơn bởi nó có ảnh hưởng đến database của blog mà bạn đang chạy.

Bản thân tôi trước đây cũng không quan tâm đến chuyện này, bởi dù có quan tâm hay không thì blog của mình vẫn chạy bình thường, đâu có bị trục trặc gì mà phải vọc phá chi cho tốn thời gian. :mrgreen:

Nhưng tình cờ một hôm tôi vào phpMyAdmin để backup database cho blog thì tôi phát hiện ra rằng: có rất nhiều bài viết cùng 'post_title', 'post_content', 'post_author' nhưng lại khác 'ID', 'post_date' và 'post_type' trong table 'wp_posts'. Chỉ cần dùng một câu lệnh SQL đơn giản dưới đây là bạn sẽ thấy được ngay: (nhớ thay chữ 'Hello World!' bằng tên một bài viết nào đó trên blog của bạn)

1
2
3
SELECT ID, post_title, post_author, post_content, post_date, post_type
FROM wp_posts
WHERE post_title = 'Hello World!'

sql
Xem qua một loạt các bài viết như vậy, tôi mới nhận thấy rằng: trong số những bài trùng lặp ấy, chỉ có một bài duy nhất có 'post_type' là 'post' (hoặc 'page' nếu đó là trang) là bài viết đang được publish, còn lại là attachment và revision <= cái mà chúng ta đang nói đến.

Vậy revision là gì và tại sao WordPress lại tạo ra chúng? Câu trả lời sẽ được giải đáp ở trang 2 của bài viết này.

Pages: 1 2 3 4