Skip to content

Instantly share code, notes, and snippets.

View christoferw's full-sized avatar

Christofer Wesseling christoferw

View GitHub Profile
@christoferw
christoferw / .htaccesshtaccess
Created September 3, 2018 13:08
htaccess für Wordpress: Caching und Komprimierung
## EXPIRES CACHING ##
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType image/jpg "access plus 1 month"
ExpiresByType image/svg+xml "access plus 1 month"
#ExpiresByType text/css "access plus 1 day"
#ExpiresByType text/html "access plus 1 day"
@christoferw
christoferw / .htaccesshtaccess
Created September 3, 2018 13:08
htaccess für Wordpress: Caching und Komprimierung
## EXPIRES CACHING ##
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType image/jpg "access plus 1 month"
ExpiresByType image/svg+xml "access plus 1 month"
#ExpiresByType text/css "access plus 1 day"
#ExpiresByType text/html "access plus 1 day"
@christoferw
christoferw / .htaccess
Created September 3, 2018 13:13
htaccess Wordpress: Force SSL and WWW or NON-WWW
RewriteEngine on
# Force www:
RewriteCond %{HTTP_HOST} !^$
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteCond %{HTTPS}s ^on(s)|
RewriteRule ^ http%1://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
# Alternativ: Force NON-WWW
#RewriteBase /
@christoferw
christoferw / WP-Config.php
Created September 3, 2018 13:16
WP-Config common used settings
@ini_set("max_execution_time", 300);
@ini_set("memory_limit", "256M");
define('WP_MEMORY_LIMIT', '512M');
define('DISABLE_WP_CRON', true);
//
ini_set('error_reporting', E_ERROR);
define('WP_DEBUG', true);
define( 'WP_DEBUG_LOG', true );
define('WP_DEBUG_DISPLAY', false);
@christoferw
christoferw / setup_mailcatcher.sh
Created January 7, 2019 10:11 — forked from shark0der/setup_mailcatcher.sh
Mailcatcher installation script for Ubuntu 16.04 (14.04 commands commented out)
#!/bin/bash
# Install dependencies
# older ubuntus
#apt-get install build-essential libsqlite3-dev ruby1.9.1-dev
# xenial
apt install build-essential libsqlite3-dev ruby-dev
# Install the gem
gem install mailcatcher --no-ri --no-rdoc