List all tags outside loop

    <?php $tags = get_tags();
    if ($tags) {
    foreach ($tags as $tag) {
    echo '<li><a href="' . get_tag_link( $tag->term_id ) . '" title="' . sprintf( __( "View all posts in %s" ), $tag->name ) . '" ' . '>' . $tag->name.'</a></li> ';
    } ?>

List all categories outside loop

      $args = array(
         'orderby' => 'slug',
         'parent' => 0
      $categories = get_categories( $args );
      foreach ( $categories as $category ) {
         echo '<li><a href="' . get_category_link( $category->term_id ) . '" rel="bookmark">' . $category->name . '' . '' . $category->description . '</a></li>';


Hide Dashboard menu items for specific user

To do a “dirty” quick remove Dashboard menu can save you a lot of time, if you have a custom post type that user should only have access to.

In functions.php add the following to remove menu items for the user group Editor:

/* hide Dashboard menu items for user: editor */
add_action( 'admin_init', 'my_remove_menu_pages' );
function my_remove_menu_pages() {
    global $user_ID;
    if ( current_user_can( 'editor' ) ) {
    remove_menu_page('edit.php'); // Posts
    remove_menu_page('upload.php'); // Media
    remove_menu_page('link-manager.php'); // Links
    remove_menu_page('edit-comments.php'); // Comments
    remove_menu_page('edit.php?post_type=page'); // Pages
    remove_menu_page('plugins.php'); // Plugins
    remove_menu_page('themes.php'); // Appearance
    remove_menu_page('users.php'); // Users
    remove_menu_page('tools.php'); // Tools
    remove_menu_page('options-general.php'); // Settings



Default setup: .htaccess

GZIP, Deflate, and Caching

<IfModule mod_gzip.c>
    mod_gzip_on Yes
    mod_gzip_item_include file        \.(html?|txt|css|js|php|pl)$
    mod_gzip_item_include handler    ^cgi-script$
    mod_gzip_item_include mime        ^text/.*
    mod_gzip_item_include mime        ^application/x-javascript.*
    mod_gzip_item_exclude mime        ^image/.*
    mod_gzip_item_exclude rspheader    ^Content-Encoding:.*gzip.*
<IfModule mod_deflate.c>
    # Compress HTML, CSS, JavaScript, Text, XML and fonts
    AddOutputFilterByType DEFLATE application/javascript
    AddOutputFilterByType DEFLATE application/rss+xml
    AddOutputFilterByType DEFLATE application/
    AddOutputFilterByType DEFLATE application/x-font
    AddOutputFilterByType DEFLATE application/x-font-opentype
    AddOutputFilterByType DEFLATE application/x-font-otf
    AddOutputFilterByType DEFLATE application/x-font-truetype
    AddOutputFilterByType DEFLATE application/x-font-ttf
    AddOutputFilterByType DEFLATE application/x-javascript
    AddOutputFilterByType DEFLATE application/xhtml+xml
    AddOutputFilterByType DEFLATE application/xml
    AddOutputFilterByType DEFLATE font/opentype
    AddOutputFilterByType DEFLATE font/otf
    AddOutputFilterByType DEFLATE font/ttf
    AddOutputFilterByType DEFLATE image/svg+xml
    AddOutputFilterByType DEFLATE image/x-icon
    AddOutputFilterByType DEFLATE text/css
    AddOutputFilterByType DEFLATE text/html
    AddOutputFilterByType DEFLATE text/javascript
    AddOutputFilterByType DEFLATE text/plain
    AddOutputFilterByType DEFLATE text/xml
    # Remove browser bugs (only needed for really old browsers)
    BrowserMatch ^Mozilla/4 gzip-only-text/html
    BrowserMatch ^Mozilla/4\.0[678] no-gzip
    BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
    Header append Vary User-Agent
<IfModule mod_expires.c>
    ExpiresActive On
    ExpiresByType image/jpg "access 1 month"
    ExpiresByType image/jpeg "access 1 month"
    ExpiresByType image/gif "access 1 month"
    ExpiresByType image/png "access 1 month"
    ExpiresByType text/css "access 1 month"
    ExpiresByType text/html "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"
    ExpiresDefault "access 1 month"

Default setup: wp-config.php

Empty Trash

Default: 30 days

Define number of days to keep before trashing:

define ('EMPTY_TRASH_DAYS', 7);

Disable trash:

define ('EMPTY_TRASH_DAYS', 0);

Reduce Post Revisions

Define number of kept revisions:

define( 'WP_POST_REVISIONS', 3 );

Disable revisions:

define( 'WP_POST_REVISIONS', false );