Consider supporting my work by purchasing the course this tutorial is a part of i.e. VSCode Power User →
- Make sure your
Local by FlyWheelWordPress install is a custom install
| " Make IE Better Compatible " | |
| <!--[if IE]> | |
| <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> | |
| <![endif]--> | |
| ====================================================== | |
| IE6 Only | |
| ================== | |
| _selector {...} |
| #!/bin/bash -e | |
| ## | |
| # WordPress Installation and VirtualHost Creation | |
| # | |
| # Description: Installs a WordPress website in the ~/Sites folder, creates a homepage, | |
| # cleans up the WP install a bit, deletes the akismet and hello dolly plugins, creates the permalinks, | |
| # clones the roots/sage theme framework to the theme folder, deletes all the other WP default themes, | |
| # installs/runs npm and bower and runs gulp to create the initial assets, adds a custom gitignore file | |
| # to /wp-content, installs the roots/soil plugin, creates a git repo in wp-content, saves the WordPress |
| #!/bin/bash | |
| # Generate your Dropbox token: https://www.dropbox.com/developers/apps | |
| DROPBOX_TOKEN={dropbox access token here} | |
| # Directory that holds your WordPress sites' root folders | |
| PREFIX=/var/www | |
| # If you have multiple folders with WordPress sites, add/remove them from this array | |
| directories=( "foo.com" "bar.com" ) |
| # pull a production WP database to an existing local site | |
| # uses current directory as theme path and ssh alias | |
| pullprod() { | |
| START=$(date +%s) | |
| # get current directory name, used for database and URL | |
| # TODO: use echo get_template_directory() and get characters from right to first / | |
| current=${PWD##*/} | |
| cd ~/Sites/$current | |
| # make a backup of the current local database | |
| wp db export _db.sql |
| List of PHP 7 Packages: https://launchpad.net/ubuntu/+source/php7.0 | |
| Disclaimer: I get unreliable results when I don't run these commands seperately and in order. | |
| vagrant ssh | |
| sudo apt-get update | |
| sudo add-apt-repository ppa:ondrej/php | |
| sudo apt-get install php7.0 | |
| sudo apt-get update |
| // Get height of window and set an offset from bottom | |
| var winHeight = $(window).height(); | |
| var offset = 50; | |
| // Recalc height of window in case of resize | |
| $(window).bind('resizeEnd', function() { | |
| winHeight = $(window).height(); | |
| }); | |
| // When we scroll we do some checks... |
| # wp-cli alias to push a local WP database to a staging site | |
| pushstage() { | |
| START=$(date +%s) | |
| # make a backup of the current local database | |
| # get current directory name, used for database and URL | |
| current=${PWD##*/} | |
| wp db export $current.sql | |
| # rsync the local database to staging site | |
| rsync $current.sql $current-s:~/ | |
| # get the staging site URL for search replace |
| (function($){ | |
| 'use strict'; | |
| /* | |
| * jQuery htmlDoc "fixer" - v0.2pre - 8/8/2011 | |
| * http://benalman.com/projects/jquery-misc-plugins/ | |
| * | |
| * Copyright (c) 2010 "Cowboy" Ben Alman | |
| * Dual licensed under the MIT and GPL licenses. |
| #!/bin/bash | |
| # Get the required project variables | |
| printf "Project name: " | |
| read PROJECT_NAME | |
| printf "Project folder name: " | |
| read PROJECT_FOLDER | |
| printf "Database Name: " |
Consider supporting my work by purchasing the course this tutorial is a part of i.e. VSCode Power User →
Local by FlyWheel WordPress install is a custom install