• everything should work out of the box - default settings should fit for the most users;
  • Decisions not Options. Try to make as few options as possible. It’s not about eliminating options, it’s about having the right options;
<?php force_balance_tags( $text ); ?>
add_action( 'wp_footer', 'insert_code' ); // default WordPress action usage
add_action( 'wp_footer', array( $this, 'insert_code' ) ); // action usage inside of a class

WordPrss .htaccess sample

# BEGIN Security Redirects
<IfModule mod_rewrite.c>
#Redirect 301 /wp-login.php /readme.html
Redirect 301 /wp-comments-post.php /readme.html
Redirect 301 /xmlrpc.php /readme.html
Redirect 301 /wp-trackback.php /readme.html
# END Security Redirects

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress

# compress text, html, javascript, css, xml:
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
AddType x-font/otf .otf
AddType x-font/ttf .ttf
AddType x-font/eot .eot
AddType x-font/woff .woff
AddType image/x-icon .ico
AddType image/png .png

<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access 1 year"
ExpiresByType image/jpeg "access 1 year"
ExpiresByType image/gif "access 1 year"
ExpiresByType image/png "access 1 year"
ExpiresByType text/css "access 1 month"
ExpiresByType application/pdf "access 1 month"
ExpiresByType text/x-javascript "access 1 month"
ExpiresByType application/x-shockwave-flash "access 1 month"
ExpiresByType image/x-icon "access 1 year"
AddHandler application/x-httpd-php56 .php .php5 .php4 .php3 .php2

Leave a Comment