Code Snippets

Review snippet that you'd like with Chrome, simple as click and copy...


.htaccess

WordPress

Snippets

Force HTTPS .htaccess code

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

Basic Default WP .htaccess code

        # BEGIN WordPress
        
        RewriteEngine On
        RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
        RewriteBase /
        RewriteRule ^index\.php$ - [L]
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteRule . /index.php [L]
        
        # END WordPress
        

WP SILENT Debug snippet (creates debug.log in wp-content folder)

        # Enable WP_DEBUG mode
        define( 'WP_DEBUG', true );
        
        # Enable Debug logging to the /wp-content/debug.log file
        define( 'WP_DEBUG_LOG', true );
        
        # Disable display of errors and warnings
        define( 'WP_DEBUG_DISPLAY', false );
        @ini_set( 'display_errors', 0 );
        
        

Disable WP-Cron (MWP in particular)

        # Disable WP-Cron
        define( 'DISABLE_WP_CRON', true );