Một số việc cần làm sau khi cài WordPress

Nếu bạn đang tìm kiếm một giao diện gọn gàng hơn khi đăng nhập vào WordPress, thì tin tốt là bạn có thể xóa các tiện ích con trên bảng điều khiển khá dễ dàng chỉ với vài dòng code .

Mở file functions.php của chủ đề hoặc chủ đề con của bạn và thêm mã sau

Tự động chuyển http sang https

Mở file .htaccess tìm dòng “RewriteEngine On”, sau đó thêm dòng text bên dưới

RewriteCond %{HTTPS} off 
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

Dashboard Widgets

//Disable Default Dashboard Widgets
add_action('wp_dashboard_setup', 'remove_dashboard_widgets' );
function remove_dashboard_widgets() {
    global $wp_meta_boxes;
    unset($wp_meta_boxes['dashboard']);
}
remove_action('welcome_panel', 'wp_welcome_panel');

Bỏ Autosave với wp-config.php

define('AUTOSAVE_INTERVAL', 86400);

Bỏ WordPress Post Revisions với wp-config.php

define(‘WP_POST_REVISIONS’, false );

Switch Back to Classic Editor

add_filter('use_block_editor_for_post', '__return_false', 10);

Leave a Comment

Your email address will not be published. Required fields are marked *