Posted on July 8th, 2009 in WP Tutorial | 4,034 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 April 12th, 2009 in WP News | 3,266 views

Mặc dù năm 2008 đã trôi qua được hơn 4 tháng nhưng tôi vẫn muốn đăng lại danh sách những người viết plugin cho WordPress được download nhiều nhất trong năm vừa qua để các bạn - những thành viên của cộng đồng WordPress Việt Nam - biết thêm về họ cũng như những sản phẩm mà họ làm ra. Để từ đó giúp bạn có cái nhìn cụ thể hơn về hệ thống plugin đồ sộ đang ngày một tăng dần cũng như mức độ ảnh hưởng của WordPress đang lan rộng trong cộng đồng blogger hiện nay.

Dưới đây là danh sách 10 nhân vật nổi tiếng trong giới WordPress đã cho ra những plugin được download nhiều nhất:

  1. Michael Torbert
    Tác giả của plugin All In One SEO Pack với 961.306 lượt download, một plugin giúp WordPress đạt SEO khá tốt, ai mà không xài thì quá uổng. :-"

  2. Matt Mullenweg
    Tác giả của plugin Akismet với 921.827 lượt download, một plugin chống spam quá nổi tiếng. Matt cũng chính là người sáng lập ra blog WordPress, ông tổ đấy :D

  3. Lester ‘GaMerZ’ Chan
    Tác giả của plugin WP-Polls với 775.220 lượt download, ngoài ra còn một số plugin khác như WP-Postviews, WP-PageNavi, WP-Print, WP-Email... plugin nào cũng có phần quản lý khá chuyên nghiệp.

  4. Arne Brachhold
    Tác giả của plugin Google XML Sitemaps với 628.350 lượt download, không có plugin này thì blog của bạn khó lòng được Google biết đến. :|

  5. Andy Skelton
    Tác giả của plugin WordPress.com Stats với 449.345 lượt download, tác giả còn là một hacker khá pro.

  6. Alex Rabe
    Tác giả của plugin NextGEN Gallery với 429.705 lượt download, một plugin tạo gallery cho WordPress, rất phù hợp với blog có nhiều hình ảnh.

  7. Oliver Seidel
    Tác giả của plugin cforms II với 361.918 lượt download, một plugin tạo form contact đa năng và chuyên nghiệp.

  8. Joost de Valk
    Tác giả của plugin Sociable với 328.036 lượt downloads, plugin này tạo các nút để giúp người đọc submit blog của bạn lên các mạng xã hội, traffic sẽ tăng cao lắm đấy. Ngoài ra còn có plugin Google Analytics for WP

  9. Donncha O Caoimh
    Tác giả của plugin WP Super Cache với 246.752 lượt download. Nếu muốn blog chạy nhanh hơn một chút thì bạn nên thử qua plugin này, nó cache khá tốt.

  10. Vladimir Prelovac
    Tác giả của plugin Smart YouTube với 244.963 lượt download, ngoài ra tác giả còn có một số plugin khác về SEO rất hay.

Bổ sung thêm một số thông tin lý thú khác:

Đáng tiếc là người Việt Nam chúng ta chưa có ai được lọt vào top 10 này, tôi cũng có viết 2 plugin nhưng số lượt download rất thấp (dưới 1000) nên không dám mơ tới việc vào top 10, chắc chỉ đáng nằm trong top 10.000 thôi. :D Nhưng hy vọng trong thời gian sắp tới sẽ có đại diện của plugin "made in VietNam" xuất hiện trong bảng tổng kết này. Các developer của WordPressVN cố lên nhé!

=================
Danh sách trên do W-Shadow.com tổng hợp, bạn có thể xem bài viết gốc tại đây.

Posted on April 10th, 2009 in WP Plugins | 3,279 views

Bạn thấy đấy, WordPress không cho phép chúng ta di chuyển comment từ bài viết này sang bài viết khác. Đây quả là một bất tiện khi bạn muốn sắp xếp các comment ở đúng vị trí của chúng bởi vì không phải lúc nào người xem cũng viết comment ở đúng nơi bạn mong muốn. Tuy nhiên vẫn có thể giải quyết được vấn đề này bằng cách dùng một trong bốn plugin mà tôi sắp giới thiệu dưới đây.

1. WP Move Comments

Một sản phẩm "made in VietNam" do rilwis viết. Sau khi cài, plugin này sẽ tự động thêm chữ Move vào bên dưới mỗi comment.
wp-move-comments
Muốn chuyển comment nào thì bạn click vào chữ Move sau đó nhập ID của bài viết cần chuyển đến. Cách lấy ID của bài viết thì mời bạn xem tại trang chủ của plugin.
-- Ưu điểm: gọn nhẹ, dễ sử dụng, tác giả là người Việt nên dễ liên hệ. :D
-- Nhược điểm: người dùng phải tự lấy ID bài viết và không chuyển nhiều comment cùng một lúc được.

2. Comment Move

Sau khi cài plugin, để di chuyển comment, bạn bấm vào chữ Edit (nhớ rê chuột vào comment thì menu mới hiện ra)
comment-move-1
Kế tiếp, bạn chọn bài viết cần chuyển comment đến, plugin sẽ tự động lấy ID của bài viết đó và bạn chỉ việc bấm nút Update Comment là xong.
comment-move-3
-- Ưu điểm: lấy ID bài viết một cách tự động
-- Nhược điểm: không chuyển nhiều comment cùng một lúc được.

3. BDP Move Comments

Sau khi cài, plugin này sẽ thêm một page trong phần quản lý comment (Dashboard > Comments > Move Comments). Khi vào, bạn sẽ thấy phần tùy chọn cho plugin và bên dưới là một bảng chứa tất cả comment trên blog đã được phân trang (mỗi trang gồm 20 comment).

Ý nghĩa của từng tùy chọn như sau:

1) Enable the "Move it!" button for blog superusers when they browse comments
=> Hiện thêm nút "Move it!" bên dưới mỗi comment (bên ngoài blog chứ không phải trong wp-admin)

2) List all possible destinations for a move
=> Liệt kê tất cả bài viết trên blog (kể cả attachment) để bạn chọn khi muốn chuyển comment đến. Lưu ý: sẽ rất chậm nếu blog có quá nhiều bài viết.

3) When not listing all possible destinations, list destination posts within how many days of today
=> Nếu không dùng tùy chọn số 2 thì chỉ liệt kê những bài trong khoảng thời gian bao nhiêu ngày trở lại

4) When not listing all possible destinations, be sure to include these page and post IDs as destinations
=> Nếu không dùng tùy chọn số 2 thì bắt buộc lúc nào cũng phải liệt kê những bài có ID mà bạn chỉ định

Sau khi thiết lập tùy chọn xong, bạn chỉ việc chọn những comment cần chuyển sau đó kéo xuống dưới và bấm nút "Bulk move checked comments »". Sang trang kế tiếp, bạn lưu ý ở cột TypeStatus, bạn phải chọn những bài có type là 'post' (hoặc page) với status là 'publish' thì ra ngoài mới thấy có tác dụng.
move-comments-4
-- Ưu điểm: có thể chuyển được nhiều comment, có thêm nút "Move it!" ở bên ngoài để admin tiện sử dụng.
-- Nhược điểm: phải cấu hình thêm, không cần thiết phải liệt kê cả những attachment.

4. Move Comments

Tương tự như plugin số 3, plugin này cũng thêm một page tên là Move trong Dashboard > Comments nhưng nó không có phần tùy chọn và cách hoạt động hơi khác một chút.

Thay vì chọn comment trước thì plugin này cho bạn chọn bài viết trước. Có hai danh sách chứa tất cả bài viết trên blog, bạn chọn một bài trong ô -- Move From -- rồi chọn comment cần di chuyển đến một bài trong ô -- Move To --, sau đó bấm nút Update Options »
-- Ưu điểm: có thể chuyển được nhiều comment, không cần cấu hình thêm
-- Nhược điểm: không phân biệt bài nào là post, bài nào là page trong hai danh sách

Kết luận

Như bạn thấy, cả 4 plugin trên đều có ưu-nhược điểm riêng, hai plugin đầu thì gọn nhẹ, đơn giản nhưng chỉ tác động lên một comment còn hai plugin sau thì mạnh hơn, có thể chuyển nhiều comment cùng một lúc. Vì vậy tùy theo tình huống mà bạn hãy chọn plugin cho phù hợp. :)

Tôi đã test qua 4 plugin trên và đã hiểu phần nào về cách thức hoạt động của chúng. Nếu muốn khắc phục nhược điểm của plugin số 3, số 4 thì bạn cứ comment ở đây, tôi sẽ gửi cho bạn bản update của hai plugin đó. Ngoài ra nếu bạn còn biết thêm plugin nào khác hoặc có ý tưởng mới để dễ thao tác hơn thì xin mời bạn chia sẻ, biết đâu những ý tưởng của bạn có thể giúp tôi viết ra một plugin mới tốt hơn. :D

Posted on April 5th, 2009 in WP Plugins | 3,908 views

Vừa rồi tôi có hướng dẫn bạn cách tùy biến Smilies trong WordPress mà không cần dùng đến plugin bằng cách sửa file wp-config.php. Tuy có hơi thủ công một chút nhưng theo tôi cách đó là đơn giản và nhanh chóng nhất, khỏi phải cài plugin - cái mà tôi hạn chế càng ít càng tốt (không biết bạn thế nào :D )

Tuy nhiên, nếu bạn ngại việc sửa file cấu hình hoặc không thích đụng tới code, bạn vẫn có thể dùng plugin cho tiện. Nói về plugin cho vụ này thì có rất nhiều, bạn chỉ việc lựa chọn plugin thích hợp rồi cài vào sử dụng là xong. Tôi có liệt kê sẵn bên dưới một số cái mà tôi biết để giúp bạn đỡ mất thời gian tìm kiếm.

1. Đầu tiên phải kể đến là WP Grins của Alexking. Đây là một plugin khá đơn giản mà Alexking gọi là "A Clickable Smilies hack for WordPress", bằng cách dùng Prototype, nó sẽ tự động thêm một thẻ div (có id là wp_grins) chứa các smilies vào 2 nơi: trước ô nhập nội dung comment trên theme và dưới phần soạn thảo bài viết trong wp-admin. Các smilies được lấy từ biến $wpsmiliestrans nên bạn có thể dùng plugin này kết hợp với cách sửa file wp-config.php mà tôi đã hướng dẫn (xem ở đây)

2. WordPress Yahoo/MSN Messenger Style Smileys - Một plugin của Priyadi (người Indonesia) được khá nhiều người sử dụng, chức năng của nó là thay thế các smilies mặc định của WordPress bằng smilies của Yahoo! Messenger hoặc MSN Messenger.

priyadi-smilies

Priyadi không dùng biến $wpsmiliestrans mà tự định nghĩa thêm 2 biến khác là $yahoosmiliestrans$msnsmiliestrans lần lượt chứa tất cả smilies của Yahoo! và MSN Messenger. Để hiện smilies, bạn chèn <?php smilies_clickable(); ?> vào chỗ bạn thích trong file comments.php, plugin sẽ không hiện tất cả smilies mà chỉ hiện các smilies phổ biến, bạn có thể tùy biến chúng trong 2 biến $smilies_yahoo_always_shown và $smilies_msn_always_shown.

Lưu ý: khi sử dụng plugin này, bạn phải tắt tùy chọn Convert emoticons like :-) and :-P to graphics on display nằm trong "Settings > Writing" để WordPress không dùng các smilies mặc định nữa.

3. Smilies Themer - plugin này không giống như 2 plugin trên, nó không hiện các smilies ra bên ngoài mà chỉ thay đổi hệ thống smilies theo ý riêng của bạn. Nói một cách dễ hiểu là thay vì bạn sửa file wp-config.php bằng tay thì bạn có thể dùng plugin này để thay thế, nó cung cấp khá nhiều bộ smilies cho bạn lựa chọn, sau khi chọn xong, WordPress sẽ chỉ hiện các smilies đó mà thôi. Tôi nghĩ nếu các phiên bản kế tiếp của WordPress mà có tính năng này thì quá tuyệt! :D

4. Smilies Themer Toolbar - đây là plugin dạng "cơm thêm" cho Smilies Themer. Bạn chọn bộ smiles nào trong Smilies Themer thì plugin này sẽ hiện các smilies đó ở bên dưới ô nhập comment hoặc bạn muốn hiện ở chỗ khác thì dùng đoạn code này:

<?php if (function_exists('sm_toolbar_show')) sm_toolbar_show(); ?>

Lưu ý: plugin này chỉ chạy chung với Smilies Themer, nếu Smilies Themer chưa được cài thì plugin này không có tác dụng.
smilies-themer
5. Smiley JS Buttons - đúng như tên gọi của nó, plugin này dùng Javascript để tạo ra các smilies, nó tương tự như plugin WP Grins của Alexking nhưng đơn giản hơn một chút là nó không dùng Prototype và cũng không tự động hiện smilies ở comment form mà bạn phải chèn thêm code sau:

<?php if (function_exists('SJB_outputSmilies')) SJB_outputSmilies(); ?>

smiley_js_buttons

Đón xem tiếp phần 2....

Posted on March 4th, 2009 in WP Tutorial | 4,841 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

Posted on February 28th, 2009 in WP Plugins | 5,405 views

Quick Slugs ScreenshotDescription:
Quick Slugs is a plugin for WordPress that helps you edit, update posts/pages slugs quickly.

Requires Version:
WordPress 2.7 or higher

Supported Languages:
US English/en_US (default)
Vietnamese/vi_VN

Download:

Installation:

  1. Download the plugin and extract its content
  2. Upload the complete folder “quick-slugs” to the “/wp-content/plugins/” directory
  3. Activate the plugin through the ‘Plugins’ menu in WP-Admin
  4. Go to ‘WP-Admin -> Posts -> Quick Slugs’ to change slugs

This version supports English and Vietnamese, English is the default. To use Vietnamese, follow these steps:
1. Open wp-config.php in the WordPress root directory on your host
2. Search this line:

define ('WPLANG', '');

and revise to

define ('WPLANG', 'vi_VN');

Any questions or suggestions, please leave comments here. Thank you! :P

Posted on December 15th, 2008 in WP Plugins | 15,300 views

This is a plugin for WordPress 2.6+ that can help you know where your commenters come from, which type of web browser and OS they used when they left a comment on your blog. It provides two functions that take IP and User Agent as parameters and then return HTML string contains country flag, web browser and OS icons. You can put these icons anywhere you like in each comment.
In fact, this plugin is a combination of two plugins: WordPress Browser Detection Plugin and Easy IP2Country that I have intergrated as a built-in plugin for my premium theme before, see this page for example, but now I decide to separate it as a new plugin with some enhancements and share it for everyone. :)

Features:

  • Detects and shows commenter's country flag, web browser and operating system
  • Supports many web browsers and operating systems: major desktop browsers, antiquated browsers, blogging software (for trackbacks and pingbacks), text based browsers, various PDAs and cell phones.
  • Uses a binay file for IP to country resolution and supports database sources from Webhosting.info - Software77.net
  • The returned string can be configed as a template to suite your theme

Screenshot:

comment info detector

Download:

download

Installation:

  1. Download the plugin and extract its content
  2. Upload the complete folder "comment-info-detector" to the "/wp-content/plugins/" directory
  3. Activate the plugin through the 'Plugins' menu in WP-Admin
  4. Go to 'WP-Admin -> Settings -> Comment Info Detector' to configure the plugin

Update:

To update new version for this plugin, please deactivate it => delete the old plugin-folder from your server => upload the new plugin-folder => activate the new plugin.

Usage:

  1. Open wp-content/themes/<YOUR THEME NAME>/comment.php
  2. Find the comment loop:
    1
    
    foreach ($comments as $comment)
  3. Add anywhere you like below the comment loop:
    1
    
    <?php if (function_exists("CID_init")) { CID_print_comment_flag(); echo ' '; CID_print_comment_browser(); } ?>
  4. Optional: you can change the CSS style for flag - web browser - OS icons, open and edit:/wp-content/plugins/comment-info-detector/comment-info-detector.css

Credits

Comment Info Detector is written by me, HieuDT. Big thanks to Priyadi Iman Nurcahyo for web browser, OS detection code and Omry Yadan for IP2Country library.

Changelog:

  • 1.0.0 [12-15-2008]: First released.
  • 1.0.1 [12-16-2008]: Added two quick-tags for web browser and operating system to return result correctly.
  • 1.0.2 [01-12-2009]: Updated database for ip2country library and increase ability to detect some new web browsers - operating systems.
  • 1.0.3 [01-18-2009]: Added two options that automatically display icons, no need to modify comments.php file.
  • 1.0.4 [03-02-2009]: Updated database for ip2country and added icons for IE8, Vista.
  • 1.0.5 [09-07-2009]: Updated database for ip2country and added icons for Windows 7.

Now I still continue to develop this plugin and I'm very glad to receive feedback from you. If you feel this plugin is missing or not working well, you are welcome, please let me know! :D

Posted on December 3rd, 2008 in WP Plugins | 2,546 views


Similar to Lightbox 2, WP-Lytebox is a WordPress plugin which uses Lytebox to add a lightbox functionality to images as well as HTML content such as web pages. This plugin will automatically group all the images links in your post content into a gallery with next and previous links. Just download and install it, you are done!

Installation:

  1. Download plugin here.
  2. Upload extracted content to the /wp-content/plugins/ folder, and activate it.
  3. That all!

Note that Lytebox can also be configured via "lytebox.js" if you wish.

Posted on in WP Plugins | 1,795 views

Auto-hyperlink URLs - written by Scott Reilly - is a plugin that can transform text URLs in your post content and comment text to the URL they reference. You don't need to hyperlink already hyperlinked URLs. The plugin also improves upon WordPress’s default make_clickable function, along with adding some configuration options (such as link truncation).

This plugin will recognize any protocol-specified URI (http|https|ftp|news)://, etc, as well as e-mail addresses. It also adds the new ability to recognize Class B domain references (i.e. “somesite.net” where not just those prepended with “www.”) as valid links (i.e. “wordpress.org” would now get auto-hyperlinked).

You can view more details about the installation and usage at here

Posted on December 2nd, 2008 in WP Plugins | 2,173 views

Normally, if you want to moderate your blog comments, most of us usually login to WordPress Admin to check for any new comments awaiting to be moderated. Now you don't have to do that because there is a plugin can help you to view and moderate your blog comments directly from your desktop.

That plugin is Moderator - written by Daniel Dura. It's not only a WP plugin but also an application that notifies whenever there is a new comment submitted on your blog, something similar to Yahoo Messenger or Gtalk.

Plugin Features:

  • Viewing unmoderated comments.
  • Dock and system tray notifications of the number of unmoderated comments.
  • Accept, delete, and spam comments from within the desktop client.
  • Close application window, or minimize it to the system tray while running.
  • Shows the Gravatar icons for the user who posted the comment.

Requirements

Moderator currently requires version 2.6+ of WordPress be installed. Also, you will need Adobe AIR 1.1, which runs on Mac, Windows, and is currently in beta on Linux.

Installation

  1. Download the current plugin bundle from here. (moderator_plugin.zip | 72KB)
  2. Unzip the contents of the archive and place them in your Wordpress install directory under {wordpress install}/wp-content/plugins. You should now have a directory called ‘moderator’ in the plugins folder.
  3. Login to your administration panel, and go to the Plugins page. Activate the Moderator plugin by clicking on the ‘Activate’ link in the entry for this plugin.
  4. Now that the plugin is activated, go to the Settings tab and select the Moderator admin page. Follow the instructions on that page to install the desktop client.

I think this is a very useful plugin that you can start using to make your comment moderation easily!

Page 1 of 212»