Call Us : 0939.171 266

Email : support@nktshop.com


10
TH.10

Vì sao gọi là hack ? Bởi các thay đổi bắt buộc phải đụng vào source nguồn của WP. Nên gọi là hack để tách biệt các thay đổi thông thường, chỉ có vậy thôi !

A. How to Disable WordPress AutoSave

  1. Using your favorite FTP client, FTP to your WordPress installation.
  2. Navigate to your wp-admin directory and copy the files post.php, page.php, page-new.php and post-new.php to your desktop.
  3. Open each file with a text editor and find the following line:
    wp_enqueue_script('autosave')
  4. And add // to the beginning of the line and then save each file (the new line should look as follows):
    // wp_enqueue_script('autosave')
  5. Using your FTP client, upload the files back to the server, replacing the original files with the edited files.

B. How to Disable WordPress Post Revisions:

  1. Login via an ftp client to the folder containing your WordPress site
  2. Copy the wp-config.php file to your desktop
  3. Using a text editor (I prefer notepad++), open the wp-config.php file
  4. Before the closing ?> tag, add the following line of code:
  5. define('WP_POST_REVISIONS', false);
  6. Save the file and upload it to your server, overwriting the old file

C. How to Delete Exisitng WordPress Post Revisions:

  1. Login to your phpMyAdmin section from cPanel or equivalent
  2. Locate and select your WordPress database from the phpMyAdmin sidebar
  3. Click the SQL tab from the menu, insert the following line of code and click go to apply the changes:
  4. DELETE FROM wp_posts WHERE post_type = "revision";

That’s all there is to it, Enjoy!

Tags: , ,

Trang tương tự

Trang: 1 2

Chuyên mục : Chưa phân loại

2 phản hồi cho “Một số hack WordPress từ LancelHoff”


Mr.Test 17.10.2009

Thanks for share !

JaJa 17.10.2009

Chưa post hết, hiện đang hoàn tất hệ thống rồi post tiếp cho mọi người nghiên cứu !