Skip to content

Instantly share code, notes, and snippets.

@jennimckinnon
jennimckinnon / .htaccess
Last active March 6, 2018 02:24
Add 301 redirect to force SSL on site
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.mysite.com/$1 [R=301,L]
</IfModule>
@jennimckinnon
jennimckinnon / wp-config.php
Created January 19, 2015 14:28
Add SSL to WordPress site.
define('FORCE_SSL_ADMIN', true);
@jennimckinnon
jennimckinnon / wp-config.php
Last active August 29, 2015 14:14
One step to changing the domain on a WP Multisite install.
define('WP_HOME','http://your-new-domain.com');
define('WP_SITEURL','http://your-new-domain.com');
@jennimckinnon
jennimckinnon / wp-config.php
Created January 26, 2015 09:13
Finding your database username and password in your WordPress files.
// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', 'your_db');
/** MySQL database username */
define('DB_USER', 'yourusername');
/** MySQL database password */
define('DB_PASSWORD', 'this-is-your-password');
@jennimckinnon
jennimckinnon / .htaccess
Created January 26, 2015 11:51
An example of a 301 redirect for WordPress
Redirect 301 category/2015/02/01/this-is-a-post-title/ http://your-new-domain.com/category/2015/02/01/this-is-a-post-title/
@jennimckinnon
jennimckinnon / full-page.php
Created January 28, 2015 16:30
Remove the sidebar of the original page template file in your WordPress theme to create a new full width template.
<?php get_sidebar(); ?>
@jennimckinnon
jennimckinnon / full-width.php
Created January 28, 2015 16:47
Naming the Full Width template for a WordPress theme.
<?php
/*
Template Name: Full Width
*/
?>
@jennimckinnon
jennimckinnon / full-width.php
Created January 28, 2015 17:08
Adding a full width container ID in a WordPress template.
<div id="full-width">
@jennimckinnon
jennimckinnon / style.css
Last active August 29, 2015 14:14
The original container in a WordPress theme's style sheet.
.content {
padding-right: 40px;
width:650px;
float:left;
}