// ===== YOAST STABIL & RINGAN (FINAL) =====
// 1. Pastikan REST API aman (biar editor & upload normal)
add_filter(‘rest_authentication_errors’, function($result) {
return null;
});
// 2. Matikan fitur berat Yoast
add_filter(‘wpseo_use_page_analysis’, ‘__return_false’);
add_filter(‘wpseo_use_readability_analysis’, ‘__return_false’);
// 3. Batasi beban indexing Yoast (biar server ringan)
add_filter(‘wpseo_indexation_limit’, function() {
return 5;
});
// 4. Pastikan tidak ganggu upload media
add_filter(‘wp_handle_upload_prefilter’, function($file) {
return $file;
});
// 5. Nonaktifkan notifikasi Yoast (biar ringan)
add_filter(‘wpseo_enable_admin_bar_menu’, ‘__return_false’);
// 6. Tambah memory ringan (opsional tapi aman)
add_action(‘init’, function() {
if (function_exists(‘ini_set’)) {
@ini_set(‘memory_limit’, ‘256M’);
}
});

