# Enable all core updates, including minor and major: define( 'WP_AUTO_UPDATE_CORE', true );
add_filter( 'auto_update_plugin', '__return_true' );
add_filter( 'auto_update_theme', '__return_true' );
// Disallow file edit define( 'DISALLOW_FILE_EDIT', true );
// Disallow file edit and plugins, themes updates
define( 'DISALLOW_FILE_MODS', true );
User-agent: *
Disallow: /cgi-bin
Disallow: /wp-admin
Disallow: /wp-includes
Disallow: /wp-content/plugins
Disallow: /wp-content/cache
Disallow: /wp-content/themes
Disallow: /trackback
Disallow: */trackback
Disallow: */*/trackback
Disallow: */*/feed/*/
Disallow: */feed
Disallow: /tag/
User-agent: Yandex
Disallow: /cgi-bin
Disallow: /wp-admin
Disallow: /wp-includes
Disallow: /wp-content/plugins
Disallow: /wp-content/cache
Disallow: /wp-content/themes
Disallow: /trackback
Disallow: */trackback
Disallow: */*/trackback
Disallow: */*/feed/*/
Disallow: */feed
Disallow: /tag/
Host: yoursite.com
Sitemap: https://yoursite.com/sitemap_index.xml
<Files *.php>
deny from all
</Files>
<files wp-config.php>
order allow,deny
deny from all
</files>
<Files wp-login.php>
order deny,allow
Deny from all
# allow access from my IP address
allow from 192.168.5.1
</Files>
error_reporting(0);
@ini_set('display_errors', 0);