A WordPress boilerplate designed to facilitate WordPress theme development by using Gulp.
- Do not update
gulp-imagemin
from7.1.0
Change Domain configuration in the following files:
./wp-config-ddev.php
./config/default.json
./.ddev/config.yaml
Start DDEV:
ddev start
Import database:
ddev import-db --gzip=false --file=./db/db.sql
Export database:
ddev export-db --gzip=false --file=./db/db.sql
Search and replace URLs in the database:
ddev wp search-replace 'wpeb.ddev.site' 'example.site' --report-changed-only=true --precise --all-tables
Open HeidiSQL:
ddev heidisql
Install CSSComb globally:
npm install csscomb -g # https://github.com/csscomb/csscomb.js
Install Gulp and dependencies:
npm i -g gulp gulp-cli
npm i
npm run start
Install PHP CodeSniffer globally:
composer global require "squizlabs/php_codesniffer=*"
For more details on setting up PHP CodeSniffer in PhpStorm, visit:
Initialize Stylelint:
npm init stylelint
For more information, visit:
Install necessary dependencies and WP CLI:
sudo apt install curl --yes
sudo apt install php-cli --yes
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
php -r "readfile('https://raw.githubusercontent.com/wp-cli/wp-cli/master/utils/wp-cli-checksums.sha256');"
chmod +x wp-cli.phar
sudo mv wp-cli.phar /usr/local/bin/wp
wp --info
Refresh the salts defined in the wp-config.php file:
wp config shuffle-salts
For more commands and usage, refer to the WP CLI documentation.
Replace URLs in the database:
wp search-replace 'wp-framework.local' 'wpeb.ddev.site' --report-changed-only=true --precise --all-tables
Another search-replace example:
wp search-replace 'wpeb.local' 'example.local' --allow-root
.dblock
-@extend .dblock
- for various:before
/:after
elements.align-center-parent
- perfect centering (horizontal and vertical), set to the parent element that needs to be centered -.align-center
.justify-child
- parent element, blocks inside will be the full width.
@include linear-gradient(yellow, blue);
* @include linear-gradient(to top, red 0%, green 50%, orange 100%);
@include linear-gradient(45deg, orange 0%, pink 50%, green 50.01%, green 50.01%, violet 100%);
Convert pixels to ems, e.g., for a relational value of 12px write em(12)
when the parent is 16px. If the parent is another value, say 24px, write em(12, 24)
.
Use the triangle generator:
- Triangle Generator
@include triangle(12px, gray, down);
@include triangle(12px 6px, gray lavender, up-left);
The $size
argument can take one or two valuesβwidth height
. The $color
argument can take one or two valuesβforeground-color background-color
.
$direction: up, down, left, right, up-right, up-left, down-right, down-left
Use Transfonter for font conversion.
Bulletproof font-face
via Font Squirrel:
@include fontface('family', 'assets/fonts/', 'myfontname');
This should provide a more detailed and user-friendly documentation with additional examples and comments.