Dán code sau vào function.php
1 2 3 4 5 6 7 8 9 10 11 12 |
//ba thao tác chính nhằm tăng cường bảo mật và hiệu suất của trang WordPress add_filter('xmlrpc_enabled', '__return_false'); add_filter('wp_headers', 'webdy_remove_x_pingback'); add_filter('pings_open', '__return_false', 9999); function webdy_remove_x_pingback($headers) { unset($headers['X-Pingback'], $headers['x-pingback']); return $headers; } |
Những thao tác này giúp giảm bớt các nguy cơ bảo mật tiềm ẩn và cải thiện hiệu suất trang web WordPress của bạn.