Skip to content

Instantly share code, notes, and snippets.

View badfeather's full-sized avatar

Brad Thomason badfeather

View GitHub Profile
  1. cd to website directory
  2. Set file permissions to 644: find . -type f -exec chmod 644 {} \;
  3. Set directory permissions to 755: find . -type d -exec chmod 755 {} \;
  4. Change wp-config.php permissions to 660: chmod 660 wp-config.php
@badfeather
badfeather / sunrise.php
Last active June 8, 2021 18:58
Allow nested folder paths in WordPress Multisite with subdirectories
<?php
/**
* Allow nested folder paths in WordPress Multisite with subdirectories
* Updated from http://maisonbisson.com/post/14052/wordpress-hacks-nested-paths-for-wpmu-blogs/ to account for latest WordPress code
* .htaccess rules also need to be changed to:
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
@badfeather
badfeather / gist:9163346
Created February 22, 2014 22:24
Prevent caching of a Wordpress stylesheet by adding a timestamp to the URL
<link rel="stylesheet" href="<?php
echo get_stylesheet_uri()
. '?t=' . filemtime( get_stylesheet_directory() . '/style.css' );
?>" type="text/css" media="screen" />