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
- Using your favorite FTP client, FTP to your WordPress installation.
- Navigate to your wp-admin directory and copy the files post.php, page.php, page-new.php and post-new.php to your desktop.
- Open each file with a text editor and find the following line:
wp_enqueue_script('autosave')
- And add // to the beginning of the line and then save each file (the new line should look as follows):
// wp_enqueue_script('autosave')
- 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:
- Login via an ftp client to the folder containing your WordPress site
- Copy the wp-config.php file to your desktop
- Using a text editor (I prefer notepad++), open the wp-config.php file
- Before the closing ?> tag, add the following line of code:
define('WP_POST_REVISIONS', false);
- Save the file and upload it to your server, overwriting the old file
C. How to Delete Exisitng WordPress Post Revisions:
- Login to your phpMyAdmin section from cPanel or equivalent
- Locate and select your WordPress database from the phpMyAdmin sidebar
- Click the SQL tab from the menu, insert the following line of code and click go to apply the changes:
DELETE FROM wp_posts WHERE post_type = "revision";
That’s all there is to it, Enjoy!
Tags:
hack,
lancelhoff,
WordPress
Trang tương tự
Thanks for share !
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 !