chore: initial wp-boilerplate project
This commit is contained in:
15
.cpanel.yml
Normal file
15
.cpanel.yml
Normal file
@@ -0,0 +1,15 @@
|
||||
---
|
||||
deployment:
|
||||
tasks:
|
||||
- export DEPLOYPATH=/home/cascapediastjules/public_html
|
||||
- composer install
|
||||
# - pnpm --dir ./wp-content/themes/cascapediastjules install
|
||||
# - pnpm --dir ./wp-content/themes/cascapediastjules build
|
||||
# - yarn --cwd ./wp-content/themes/cascapediastjules install
|
||||
# - yarn --cwd ./wp-content/themes/cascapediastjules build
|
||||
- mkdir -p ${DEPLOYPATH}/vendor/
|
||||
- rsync -av ./vendor/ ${DEPLOYPATH}/vendor/ --delete
|
||||
- mkdir -p ${DEPLOYPATH}/wp-content/mu-plugins/
|
||||
- rsync -av ./wp-content/mu-plugins/ ${DEPLOYPATH}/wp-content/mu-plugins/ --delete
|
||||
- rsync -av ./wp-content/plugins/ ${DEPLOYPATH}/wp-content/plugins/ --delete
|
||||
- rsync -av ./wp-content/themes/ ${DEPLOYPATH}/wp-content/themes/ --delete --exclude=node_modules
|
||||
25
.gitignore
vendored
Normal file
25
.gitignore
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
# Project-specific files
|
||||
/*
|
||||
!/.cpanel.yml
|
||||
!/.gitea
|
||||
!/.gitignore
|
||||
!/.vscode
|
||||
!/composer.*
|
||||
!/phpcs.xml
|
||||
!/wp-content/
|
||||
/wp-content/*
|
||||
|
||||
# Scripts
|
||||
!/scripts/
|
||||
|
||||
# Version-controlled plugins
|
||||
!/wp-content/mu-plugins/
|
||||
!/wp-content/plugins/
|
||||
/wp-content/plugins/*
|
||||
!/wp-content/plugins/.gitkeep
|
||||
|
||||
# Version-controlled themes
|
||||
!/wp-content/themes/
|
||||
/wp-content/themes/*
|
||||
!/wp-content/themes/.gitkeep
|
||||
!/wp-content/themes/cascapediastjules/
|
||||
5
.vscode/settings.json
vendored
Normal file
5
.vscode/settings.json
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"files.associations": {
|
||||
"*.css": "tailwindcss"
|
||||
}
|
||||
}
|
||||
52
composer.json
Normal file
52
composer.json
Normal file
@@ -0,0 +1,52 @@
|
||||
{
|
||||
"name": "lewebsimple/cascapediastjules",
|
||||
"description": "WordPress project",
|
||||
"version": "0.4.25",
|
||||
"type": "project",
|
||||
"license": "MIT",
|
||||
"repositories": [
|
||||
{
|
||||
"type": "composer",
|
||||
"url": "https://satis.ledevsimple.ca"
|
||||
},
|
||||
{
|
||||
"type": "composer",
|
||||
"url": "https://wpackagist.org"
|
||||
}
|
||||
],
|
||||
"prefer-stable": true,
|
||||
"config": {
|
||||
"allow-plugins": {
|
||||
"composer/installers": true,
|
||||
"dealerdirect/phpcodesniffer-composer-installer": true
|
||||
},
|
||||
"optimize-autoloader": true,
|
||||
"preferred-install": "dist",
|
||||
"sort-packages": true
|
||||
},
|
||||
"scripts": {
|
||||
"post-create-project-cmd": [
|
||||
"./scripts/post-create.sh"
|
||||
],
|
||||
"lint": "vendor/bin/phpcs",
|
||||
"lintfix": "vendor/bin/phpcbf"
|
||||
},
|
||||
"require": {
|
||||
"chubbyphp/chubbyphp-parsing": "*",
|
||||
"lewebsimple/acf-polylang": "*",
|
||||
"lewebsimple/admin-site-enhancements-pro": "*",
|
||||
"lewebsimple/advanced-custom-fields-pro": "*",
|
||||
"lewebsimple/ithemes-security-pro": "*",
|
||||
"lewebsimple/kaliroots": "*",
|
||||
"lewebsimple/wp-offload-ses": "*",
|
||||
"wpackagist-plugin/acf-extended": "*",
|
||||
"wpackagist-plugin/disable-comments": "*",
|
||||
"wpackagist-plugin/redirection": "*",
|
||||
"wpackagist-plugin/user-switching": "*",
|
||||
"wpackagist-plugin/wordpress-seo": "*"
|
||||
},
|
||||
"require-dev": {
|
||||
"lewebsimple/wp-phpcs-ruleset": "*",
|
||||
"squizlabs/php_codesniffer": "*"
|
||||
}
|
||||
}
|
||||
877
composer.lock
generated
Normal file
877
composer.lock
generated
Normal file
@@ -0,0 +1,877 @@
|
||||
{
|
||||
"_readme": [
|
||||
"This file locks the dependencies of your project to a known state",
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "e60b6ea169623f0db03a208049a65a6a",
|
||||
"packages": [
|
||||
{
|
||||
"name": "chubbyphp/chubbyphp-parsing",
|
||||
"version": "2.0.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/chubbyphp/chubbyphp-parsing.git",
|
||||
"reference": "40a044772b2c56d19f0e8f599bfcb477f4d361ca"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/chubbyphp/chubbyphp-parsing/zipball/40a044772b2c56d19f0e8f599bfcb477f4d361ca",
|
||||
"reference": "40a044772b2c56d19f0e8f599bfcb477f4d361ca",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^8.2"
|
||||
},
|
||||
"require-dev": {
|
||||
"chubbyphp/chubbyphp-dev-helper": "dev-master",
|
||||
"infection/infection": "^0.31.9",
|
||||
"php-coveralls/php-coveralls": "^2.9",
|
||||
"phpstan/extension-installer": "^1.4.3",
|
||||
"phpstan/phpstan": "^2.1.32",
|
||||
"phpunit/phpunit": "^11.5.44",
|
||||
"respect/validation": "^2.4.4"
|
||||
},
|
||||
"suggest": {
|
||||
"respect/validation": "If your interested in using the respect/validation, please install it with ^2.4.4"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.0-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Chubbyphp\\Parsing\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Dominik Zogg",
|
||||
"email": "dominik.zogg@gmail.com"
|
||||
}
|
||||
],
|
||||
"description": "Allows parsing data of various structures, meaning the population and validation of data into a defined structure. For example, converting an API request into a Data Transfer Object (DTO).",
|
||||
"keywords": [
|
||||
"chubbyphp",
|
||||
"dto",
|
||||
"parsing",
|
||||
"population",
|
||||
"validation",
|
||||
"zod"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/chubbyphp/chubbyphp-parsing/issues",
|
||||
"source": "https://github.com/chubbyphp/chubbyphp-parsing/tree/2.0.1"
|
||||
},
|
||||
"time": "2025-11-29T17:52:02+00:00"
|
||||
},
|
||||
{
|
||||
"name": "composer/installers",
|
||||
"version": "v2.3.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/composer/installers.git",
|
||||
"reference": "12fb2dfe5e16183de69e784a7b84046c43d97e8e"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/composer/installers/zipball/12fb2dfe5e16183de69e784a7b84046c43d97e8e",
|
||||
"reference": "12fb2dfe5e16183de69e784a7b84046c43d97e8e",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"composer-plugin-api": "^1.0 || ^2.0",
|
||||
"php": "^7.2 || ^8.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"composer/composer": "^1.10.27 || ^2.7",
|
||||
"composer/semver": "^1.7.2 || ^3.4.0",
|
||||
"phpstan/phpstan": "^1.11",
|
||||
"phpstan/phpstan-phpunit": "^1",
|
||||
"symfony/phpunit-bridge": "^7.1.1",
|
||||
"symfony/process": "^5 || ^6 || ^7"
|
||||
},
|
||||
"type": "composer-plugin",
|
||||
"extra": {
|
||||
"class": "Composer\\Installers\\Plugin",
|
||||
"branch-alias": {
|
||||
"dev-main": "2.x-dev"
|
||||
},
|
||||
"plugin-modifies-install-path": true
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Composer\\Installers\\": "src/Composer/Installers"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Kyle Robinson Young",
|
||||
"email": "kyle@dontkry.com",
|
||||
"homepage": "https://github.com/shama"
|
||||
}
|
||||
],
|
||||
"description": "A multi-framework Composer library installer",
|
||||
"homepage": "https://composer.github.io/installers/",
|
||||
"keywords": [
|
||||
"Dolibarr",
|
||||
"Eliasis",
|
||||
"Hurad",
|
||||
"ImageCMS",
|
||||
"Kanboard",
|
||||
"Lan Management System",
|
||||
"MODX Evo",
|
||||
"MantisBT",
|
||||
"Mautic",
|
||||
"Maya",
|
||||
"OXID",
|
||||
"Plentymarkets",
|
||||
"Porto",
|
||||
"RadPHP",
|
||||
"SMF",
|
||||
"Starbug",
|
||||
"Thelia",
|
||||
"Whmcs",
|
||||
"WolfCMS",
|
||||
"agl",
|
||||
"annotatecms",
|
||||
"attogram",
|
||||
"bitrix",
|
||||
"cakephp",
|
||||
"chef",
|
||||
"cockpit",
|
||||
"codeigniter",
|
||||
"concrete5",
|
||||
"concreteCMS",
|
||||
"croogo",
|
||||
"dokuwiki",
|
||||
"drupal",
|
||||
"eZ Platform",
|
||||
"elgg",
|
||||
"expressionengine",
|
||||
"fuelphp",
|
||||
"grav",
|
||||
"installer",
|
||||
"itop",
|
||||
"known",
|
||||
"kohana",
|
||||
"laravel",
|
||||
"lavalite",
|
||||
"lithium",
|
||||
"magento",
|
||||
"majima",
|
||||
"mako",
|
||||
"matomo",
|
||||
"mediawiki",
|
||||
"miaoxing",
|
||||
"modulework",
|
||||
"modx",
|
||||
"moodle",
|
||||
"osclass",
|
||||
"pantheon",
|
||||
"phpbb",
|
||||
"piwik",
|
||||
"ppi",
|
||||
"processwire",
|
||||
"puppet",
|
||||
"pxcms",
|
||||
"reindex",
|
||||
"roundcube",
|
||||
"shopware",
|
||||
"silverstripe",
|
||||
"sydes",
|
||||
"sylius",
|
||||
"tastyigniter",
|
||||
"wordpress",
|
||||
"yawik",
|
||||
"zend",
|
||||
"zikula"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/composer/installers/issues",
|
||||
"source": "https://github.com/composer/installers/tree/v2.3.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://packagist.com",
|
||||
"type": "custom"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/composer",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://tidelift.com/funding/github/packagist/composer/composer",
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2024-06-24T20:46:46+00:00"
|
||||
},
|
||||
{
|
||||
"name": "lewebsimple/acf-polylang",
|
||||
"version": "v1.4.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "ssh://git@gitea.websimple.com:222/wp-plugins/acf-polylang.git",
|
||||
"reference": "3998e44ccc400bd6233c98364df03a4f6db4f7b0"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://satis.ledevsimple.ca/dist/lewebsimple/acf-polylang/lewebsimple-acf-polylang-v1.4.0-d64a6e.zip",
|
||||
"reference": "3998e44ccc400bd6233c98364df03a4f6db4f7b0",
|
||||
"shasum": "1cb04729c3991e538bc38b3ef2371f9cbe47aea6"
|
||||
},
|
||||
"type": "wordpress-plugin",
|
||||
"time": "2025-04-11T12:05:23+00:00"
|
||||
},
|
||||
{
|
||||
"name": "lewebsimple/admin-site-enhancements-pro",
|
||||
"version": "v8.1.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "ssh://git@gitea.websimple.com:222/wp-plugins/admin-site-enhancements-pro.git",
|
||||
"reference": "75ff8c27a098f162969f23550d3754eab9063a11"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://satis.ledevsimple.ca/dist/lewebsimple/admin-site-enhancements-pro/lewebsimple-admin-site-enhancements-pro-v8.1.1-59be42.zip",
|
||||
"reference": "75ff8c27a098f162969f23550d3754eab9063a11",
|
||||
"shasum": "2e6ef4639a71325b6a1988db20b1badbffbd37d5"
|
||||
},
|
||||
"type": "wordpress-plugin",
|
||||
"time": "2025-12-12T16:17:17+00:00"
|
||||
},
|
||||
{
|
||||
"name": "lewebsimple/advanced-custom-fields-pro",
|
||||
"version": "v6.7.0.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "ssh://git@gitea.websimple.com:222/wp-plugins/advanced-custom-fields-pro.git",
|
||||
"reference": "0f05fc999189ec688c19abe4d8c889f947ec96c3"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://satis.ledevsimple.ca/dist/lewebsimple/advanced-custom-fields-pro/lewebsimple-advanced-custom-fields-pro-v6.7.0.2-911a1f.zip",
|
||||
"reference": "0f05fc999189ec688c19abe4d8c889f947ec96c3",
|
||||
"shasum": "2782595387ea3b62a81cdb0a79ec75e9beca8aa7"
|
||||
},
|
||||
"type": "wordpress-plugin",
|
||||
"time": "2025-12-12T16:12:43+00:00"
|
||||
},
|
||||
{
|
||||
"name": "lewebsimple/ithemes-security-pro",
|
||||
"version": "v8.5.8",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "ssh://git@gitea.websimple.com:222/wp-plugins/ithemes-security-pro.git",
|
||||
"reference": "d9b6bd9368baef4b8775928c04eaa5d1bdfb004d"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://satis.ledevsimple.ca/dist/lewebsimple/ithemes-security-pro/lewebsimple-ithemes-security-pro-v8.5.8-c0732d.zip",
|
||||
"reference": "d9b6bd9368baef4b8775928c04eaa5d1bdfb004d",
|
||||
"shasum": "2940032a3bfb6f7c7773e4e210fdfed2df554985"
|
||||
},
|
||||
"type": "wordpress-plugin",
|
||||
"time": "2025-07-22T14:11:07+00:00"
|
||||
},
|
||||
{
|
||||
"name": "lewebsimple/kaliroots",
|
||||
"version": "v0.9.18",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "ssh://git@gitea.websimple.com:222/wp-themes/kaliroots.git",
|
||||
"reference": "720554dff6ea45216b52187b7e8d5b87200d55a4"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://satis.ledevsimple.ca/dist/lewebsimple/kaliroots/lewebsimple-kaliroots-v0.9.18-77d6cf.zip",
|
||||
"reference": "720554dff6ea45216b52187b7e8d5b87200d55a4",
|
||||
"shasum": "fd6aea0ef1bc160bc183eb7239cc9adf2fd88169"
|
||||
},
|
||||
"type": "wordpress-theme",
|
||||
"time": "2025-10-10T12:11:22+00:00"
|
||||
},
|
||||
{
|
||||
"name": "lewebsimple/wp-offload-ses",
|
||||
"version": "v1.6.8",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "ssh://git@gitea.websimple.com:222/wp-plugins/wp-offload-ses.git",
|
||||
"reference": "7b6046d329e96da3a5f6714cd73e14172d9e7840"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://satis.ledevsimple.ca/dist/lewebsimple/wp-offload-ses/lewebsimple-wp-offload-ses-v1.6.8-368121.zip",
|
||||
"reference": "7b6046d329e96da3a5f6714cd73e14172d9e7840",
|
||||
"shasum": "dd0d6ff96a3c6cd6abe248ad53287a47b6f78de3"
|
||||
},
|
||||
"type": "wordpress-plugin",
|
||||
"time": "2025-01-09T15:43:07+00:00"
|
||||
},
|
||||
{
|
||||
"name": "wpackagist-plugin/acf-extended",
|
||||
"version": "0.9.2.2",
|
||||
"source": {
|
||||
"type": "svn",
|
||||
"url": "https://plugins.svn.wordpress.org/acf-extended/",
|
||||
"reference": "tags/0.9.2.2"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://downloads.wordpress.org/plugin/acf-extended.0.9.2.2.zip"
|
||||
},
|
||||
"require": {
|
||||
"composer/installers": "^1.0 || ^2.0"
|
||||
},
|
||||
"type": "wordpress-plugin",
|
||||
"homepage": "https://wordpress.org/plugins/acf-extended/"
|
||||
},
|
||||
{
|
||||
"name": "wpackagist-plugin/disable-comments",
|
||||
"version": "2.6.1",
|
||||
"source": {
|
||||
"type": "svn",
|
||||
"url": "https://plugins.svn.wordpress.org/disable-comments/",
|
||||
"reference": "tags/2.6.1"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://downloads.wordpress.org/plugin/disable-comments.2.6.1.zip"
|
||||
},
|
||||
"require": {
|
||||
"composer/installers": "^1.0 || ^2.0"
|
||||
},
|
||||
"type": "wordpress-plugin",
|
||||
"homepage": "https://wordpress.org/plugins/disable-comments/"
|
||||
},
|
||||
{
|
||||
"name": "wpackagist-plugin/redirection",
|
||||
"version": "5.6.0",
|
||||
"source": {
|
||||
"type": "svn",
|
||||
"url": "https://plugins.svn.wordpress.org/redirection/",
|
||||
"reference": "tags/5.6.0"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://downloads.wordpress.org/plugin/redirection.5.6.0.zip"
|
||||
},
|
||||
"require": {
|
||||
"composer/installers": "^1.0 || ^2.0"
|
||||
},
|
||||
"type": "wordpress-plugin",
|
||||
"homepage": "https://wordpress.org/plugins/redirection/"
|
||||
},
|
||||
{
|
||||
"name": "wpackagist-plugin/user-switching",
|
||||
"version": "1.11.1",
|
||||
"source": {
|
||||
"type": "svn",
|
||||
"url": "https://plugins.svn.wordpress.org/user-switching/",
|
||||
"reference": "tags/1.11.1"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://downloads.wordpress.org/plugin/user-switching.1.11.1.zip"
|
||||
},
|
||||
"require": {
|
||||
"composer/installers": "^1.0 || ^2.0"
|
||||
},
|
||||
"type": "wordpress-plugin",
|
||||
"homepage": "https://wordpress.org/plugins/user-switching/"
|
||||
},
|
||||
{
|
||||
"name": "wpackagist-plugin/wordpress-seo",
|
||||
"version": "26.6",
|
||||
"source": {
|
||||
"type": "svn",
|
||||
"url": "https://plugins.svn.wordpress.org/wordpress-seo/",
|
||||
"reference": "tags/26.6"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://downloads.wordpress.org/plugin/wordpress-seo.26.6.zip"
|
||||
},
|
||||
"require": {
|
||||
"composer/installers": "^1.0 || ^2.0"
|
||||
},
|
||||
"type": "wordpress-plugin",
|
||||
"homepage": "https://wordpress.org/plugins/wordpress-seo/"
|
||||
}
|
||||
],
|
||||
"packages-dev": [
|
||||
{
|
||||
"name": "dealerdirect/phpcodesniffer-composer-installer",
|
||||
"version": "v1.2.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/PHPCSStandards/composer-installer.git",
|
||||
"reference": "845eb62303d2ca9b289ef216356568ccc075ffd1"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/PHPCSStandards/composer-installer/zipball/845eb62303d2ca9b289ef216356568ccc075ffd1",
|
||||
"reference": "845eb62303d2ca9b289ef216356568ccc075ffd1",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"composer-plugin-api": "^2.2",
|
||||
"php": ">=5.4",
|
||||
"squizlabs/php_codesniffer": "^3.1.0 || ^4.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"composer/composer": "^2.2",
|
||||
"ext-json": "*",
|
||||
"ext-zip": "*",
|
||||
"php-parallel-lint/php-parallel-lint": "^1.4.0",
|
||||
"phpcompatibility/php-compatibility": "^9.0 || ^10.0.0@dev",
|
||||
"yoast/phpunit-polyfills": "^1.0"
|
||||
},
|
||||
"type": "composer-plugin",
|
||||
"extra": {
|
||||
"class": "PHPCSStandards\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"PHPCSStandards\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Franck Nijhof",
|
||||
"email": "opensource@frenck.dev",
|
||||
"homepage": "https://frenck.dev",
|
||||
"role": "Open source developer"
|
||||
},
|
||||
{
|
||||
"name": "Contributors",
|
||||
"homepage": "https://github.com/PHPCSStandards/composer-installer/graphs/contributors"
|
||||
}
|
||||
],
|
||||
"description": "PHP_CodeSniffer Standards Composer Installer Plugin",
|
||||
"keywords": [
|
||||
"PHPCodeSniffer",
|
||||
"PHP_CodeSniffer",
|
||||
"code quality",
|
||||
"codesniffer",
|
||||
"composer",
|
||||
"installer",
|
||||
"phpcbf",
|
||||
"phpcs",
|
||||
"plugin",
|
||||
"qa",
|
||||
"quality",
|
||||
"standard",
|
||||
"standards",
|
||||
"style guide",
|
||||
"stylecheck",
|
||||
"tests"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/PHPCSStandards/composer-installer/issues",
|
||||
"security": "https://github.com/PHPCSStandards/composer-installer/security/policy",
|
||||
"source": "https://github.com/PHPCSStandards/composer-installer"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://github.com/PHPCSStandards",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/jrfnl",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://opencollective.com/php_codesniffer",
|
||||
"type": "open_collective"
|
||||
},
|
||||
{
|
||||
"url": "https://thanks.dev/u/gh/phpcsstandards",
|
||||
"type": "thanks_dev"
|
||||
}
|
||||
],
|
||||
"time": "2025-11-11T04:32:07+00:00"
|
||||
},
|
||||
{
|
||||
"name": "lewebsimple/wp-phpcs-ruleset",
|
||||
"version": "0.1.5",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/lewebsimple/wp-phpcs-ruleset.git",
|
||||
"reference": "8467947b62d2c394819aa7313ddcb09086da53bb"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/lewebsimple/wp-phpcs-ruleset/zipball/8467947b62d2c394819aa7313ddcb09086da53bb",
|
||||
"reference": "8467947b62d2c394819aa7313ddcb09086da53bb",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"wp-coding-standards/wpcs": "*"
|
||||
},
|
||||
"require-dev": {
|
||||
"dealerdirect/phpcodesniffer-composer-installer": "*"
|
||||
},
|
||||
"type": "phpcodesniffer-standard",
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Pascal Martineau",
|
||||
"email": "pascal@lewebsimple.ca"
|
||||
}
|
||||
],
|
||||
"description": "Shared PHPCS ruleset for WordPress projects",
|
||||
"support": {
|
||||
"issues": "https://github.com/lewebsimple/wp-phpcs-ruleset/issues",
|
||||
"source": "https://github.com/lewebsimple/wp-phpcs-ruleset/tree/v0.1.5"
|
||||
},
|
||||
"time": "2025-12-03T16:04:08+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpcsstandards/phpcsextra",
|
||||
"version": "1.5.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/PHPCSStandards/PHPCSExtra.git",
|
||||
"reference": "b598aa890815b8df16363271b659d73280129101"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/PHPCSStandards/PHPCSExtra/zipball/b598aa890815b8df16363271b659d73280129101",
|
||||
"reference": "b598aa890815b8df16363271b659d73280129101",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.4",
|
||||
"phpcsstandards/phpcsutils": "^1.2.0",
|
||||
"squizlabs/php_codesniffer": "^3.13.5 || ^4.0.1"
|
||||
},
|
||||
"require-dev": {
|
||||
"php-parallel-lint/php-console-highlighter": "^1.0",
|
||||
"php-parallel-lint/php-parallel-lint": "^1.4.0",
|
||||
"phpcsstandards/phpcsdevcs": "^1.2.0",
|
||||
"phpcsstandards/phpcsdevtools": "^1.2.1",
|
||||
"phpunit/phpunit": "^4.5 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.3.4"
|
||||
},
|
||||
"type": "phpcodesniffer-standard",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-stable": "1.x-dev",
|
||||
"dev-develop": "1.x-dev"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"LGPL-3.0-or-later"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Juliette Reinders Folmer",
|
||||
"homepage": "https://github.com/jrfnl",
|
||||
"role": "lead"
|
||||
},
|
||||
{
|
||||
"name": "Contributors",
|
||||
"homepage": "https://github.com/PHPCSStandards/PHPCSExtra/graphs/contributors"
|
||||
}
|
||||
],
|
||||
"description": "A collection of sniffs and standards for use with PHP_CodeSniffer.",
|
||||
"keywords": [
|
||||
"PHP_CodeSniffer",
|
||||
"phpcbf",
|
||||
"phpcodesniffer-standard",
|
||||
"phpcs",
|
||||
"standards",
|
||||
"static analysis"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/PHPCSStandards/PHPCSExtra/issues",
|
||||
"security": "https://github.com/PHPCSStandards/PHPCSExtra/security/policy",
|
||||
"source": "https://github.com/PHPCSStandards/PHPCSExtra"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://github.com/PHPCSStandards",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/jrfnl",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://opencollective.com/php_codesniffer",
|
||||
"type": "open_collective"
|
||||
},
|
||||
{
|
||||
"url": "https://thanks.dev/u/gh/phpcsstandards",
|
||||
"type": "thanks_dev"
|
||||
}
|
||||
],
|
||||
"time": "2025-11-12T23:06:57+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpcsstandards/phpcsutils",
|
||||
"version": "1.2.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/PHPCSStandards/PHPCSUtils.git",
|
||||
"reference": "c216317e96c8b3f5932808f9b0f1f7a14e3bbf55"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/PHPCSStandards/PHPCSUtils/zipball/c216317e96c8b3f5932808f9b0f1f7a14e3bbf55",
|
||||
"reference": "c216317e96c8b3f5932808f9b0f1f7a14e3bbf55",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"dealerdirect/phpcodesniffer-composer-installer": "^0.4.1 || ^0.5 || ^0.6.2 || ^0.7 || ^1.0",
|
||||
"php": ">=5.4",
|
||||
"squizlabs/php_codesniffer": "^3.13.5 || ^4.0.1"
|
||||
},
|
||||
"require-dev": {
|
||||
"ext-filter": "*",
|
||||
"php-parallel-lint/php-console-highlighter": "^1.0",
|
||||
"php-parallel-lint/php-parallel-lint": "^1.4.0",
|
||||
"phpcsstandards/phpcsdevcs": "^1.2.0",
|
||||
"yoast/phpunit-polyfills": "^1.1.0 || ^2.0.0 || ^3.0.0"
|
||||
},
|
||||
"type": "phpcodesniffer-standard",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-stable": "1.x-dev",
|
||||
"dev-develop": "1.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
"PHPCSUtils/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"LGPL-3.0-or-later"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Juliette Reinders Folmer",
|
||||
"homepage": "https://github.com/jrfnl",
|
||||
"role": "lead"
|
||||
},
|
||||
{
|
||||
"name": "Contributors",
|
||||
"homepage": "https://github.com/PHPCSStandards/PHPCSUtils/graphs/contributors"
|
||||
}
|
||||
],
|
||||
"description": "A suite of utility functions for use with PHP_CodeSniffer",
|
||||
"homepage": "https://phpcsutils.com/",
|
||||
"keywords": [
|
||||
"PHP_CodeSniffer",
|
||||
"phpcbf",
|
||||
"phpcodesniffer-standard",
|
||||
"phpcs",
|
||||
"phpcs3",
|
||||
"phpcs4",
|
||||
"standards",
|
||||
"static analysis",
|
||||
"tokens",
|
||||
"utility"
|
||||
],
|
||||
"support": {
|
||||
"docs": "https://phpcsutils.com/",
|
||||
"issues": "https://github.com/PHPCSStandards/PHPCSUtils/issues",
|
||||
"security": "https://github.com/PHPCSStandards/PHPCSUtils/security/policy",
|
||||
"source": "https://github.com/PHPCSStandards/PHPCSUtils"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://github.com/PHPCSStandards",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/jrfnl",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://opencollective.com/php_codesniffer",
|
||||
"type": "open_collective"
|
||||
},
|
||||
{
|
||||
"url": "https://thanks.dev/u/gh/phpcsstandards",
|
||||
"type": "thanks_dev"
|
||||
}
|
||||
],
|
||||
"time": "2025-12-08T14:27:58+00:00"
|
||||
},
|
||||
{
|
||||
"name": "squizlabs/php_codesniffer",
|
||||
"version": "3.13.5",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git",
|
||||
"reference": "0ca86845ce43291e8f5692c7356fccf3bcf02bf4"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/0ca86845ce43291e8f5692c7356fccf3bcf02bf4",
|
||||
"reference": "0ca86845ce43291e8f5692c7356fccf3bcf02bf4",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-simplexml": "*",
|
||||
"ext-tokenizer": "*",
|
||||
"ext-xmlwriter": "*",
|
||||
"php": ">=5.4.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.3.4"
|
||||
},
|
||||
"bin": [
|
||||
"bin/phpcbf",
|
||||
"bin/phpcs"
|
||||
],
|
||||
"type": "library",
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"BSD-3-Clause"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Greg Sherwood",
|
||||
"role": "Former lead"
|
||||
},
|
||||
{
|
||||
"name": "Juliette Reinders Folmer",
|
||||
"role": "Current lead"
|
||||
},
|
||||
{
|
||||
"name": "Contributors",
|
||||
"homepage": "https://github.com/PHPCSStandards/PHP_CodeSniffer/graphs/contributors"
|
||||
}
|
||||
],
|
||||
"description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.",
|
||||
"homepage": "https://github.com/PHPCSStandards/PHP_CodeSniffer",
|
||||
"keywords": [
|
||||
"phpcs",
|
||||
"standards",
|
||||
"static analysis"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/PHPCSStandards/PHP_CodeSniffer/issues",
|
||||
"security": "https://github.com/PHPCSStandards/PHP_CodeSniffer/security/policy",
|
||||
"source": "https://github.com/PHPCSStandards/PHP_CodeSniffer",
|
||||
"wiki": "https://github.com/PHPCSStandards/PHP_CodeSniffer/wiki"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://github.com/PHPCSStandards",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/jrfnl",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://opencollective.com/php_codesniffer",
|
||||
"type": "open_collective"
|
||||
},
|
||||
{
|
||||
"url": "https://thanks.dev/u/gh/phpcsstandards",
|
||||
"type": "thanks_dev"
|
||||
}
|
||||
],
|
||||
"time": "2025-11-04T16:30:35+00:00"
|
||||
},
|
||||
{
|
||||
"name": "wp-coding-standards/wpcs",
|
||||
"version": "3.3.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/WordPress/WordPress-Coding-Standards.git",
|
||||
"reference": "7795ec6fa05663d716a549d0b44e47ffc8b0d4a6"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/WordPress/WordPress-Coding-Standards/zipball/7795ec6fa05663d716a549d0b44e47ffc8b0d4a6",
|
||||
"reference": "7795ec6fa05663d716a549d0b44e47ffc8b0d4a6",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-filter": "*",
|
||||
"ext-libxml": "*",
|
||||
"ext-tokenizer": "*",
|
||||
"ext-xmlreader": "*",
|
||||
"php": ">=7.2",
|
||||
"phpcsstandards/phpcsextra": "^1.5.0",
|
||||
"phpcsstandards/phpcsutils": "^1.1.0",
|
||||
"squizlabs/php_codesniffer": "^3.13.4"
|
||||
},
|
||||
"require-dev": {
|
||||
"php-parallel-lint/php-console-highlighter": "^1.0.0",
|
||||
"php-parallel-lint/php-parallel-lint": "^1.4.0",
|
||||
"phpcompatibility/php-compatibility": "^10.0.0@dev",
|
||||
"phpcsstandards/phpcsdevtools": "^1.2.0",
|
||||
"phpunit/phpunit": "^8.0 || ^9.0"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-iconv": "For improved results",
|
||||
"ext-mbstring": "For improved results"
|
||||
},
|
||||
"type": "phpcodesniffer-standard",
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Contributors",
|
||||
"homepage": "https://github.com/WordPress/WordPress-Coding-Standards/graphs/contributors"
|
||||
}
|
||||
],
|
||||
"description": "PHP_CodeSniffer rules (sniffs) to enforce WordPress coding conventions",
|
||||
"keywords": [
|
||||
"phpcs",
|
||||
"standards",
|
||||
"static analysis",
|
||||
"wordpress"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/WordPress/WordPress-Coding-Standards/issues",
|
||||
"source": "https://github.com/WordPress/WordPress-Coding-Standards",
|
||||
"wiki": "https://github.com/WordPress/WordPress-Coding-Standards/wiki"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://opencollective.com/php_codesniffer",
|
||||
"type": "custom"
|
||||
}
|
||||
],
|
||||
"time": "2025-11-25T12:08:04+00:00"
|
||||
}
|
||||
],
|
||||
"aliases": [],
|
||||
"minimum-stability": "stable",
|
||||
"stability-flags": {},
|
||||
"prefer-stable": true,
|
||||
"prefer-lowest": false,
|
||||
"platform": {},
|
||||
"platform-dev": {},
|
||||
"plugin-api-version": "2.6.0"
|
||||
}
|
||||
5
phpcs.xml
Normal file
5
phpcs.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0"?>
|
||||
<ruleset name="wp-boilerplate">
|
||||
<rule ref="WebsimpleWP"/>
|
||||
<file>wp-content/themes/wp-boilerplate/</file>
|
||||
</ruleset>
|
||||
5
scripts/.lwsrc
Normal file
5
scripts/.lwsrc
Normal file
@@ -0,0 +1,5 @@
|
||||
#LOCAL_DOMAIN=example.${TLD-ledevsimple.ca}
|
||||
#REMOTE_DOMAIN=www.example.com
|
||||
#REMOTE_HOST=cpanel5.lewebsimple.ca
|
||||
#REMOTE_USER=example
|
||||
#REMOTE_PATH=/home/${REMOTE_USER}/public_html
|
||||
75
scripts/common.sh
Executable file
75
scripts/common.sh
Executable file
@@ -0,0 +1,75 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
_DIR_=`dirname "$(readlink -f "$0")"`
|
||||
_FILE_=`basename $0`
|
||||
_LOG_=${SHELL_LOG:-/dev/null}
|
||||
_NOW_=`date +"%Y-%m-%d@%H:%M"`
|
||||
|
||||
# Helpers
|
||||
function CONFIRM {
|
||||
read -r -p "${1:-Are you sure?} [y/N] " response
|
||||
case "$response" in
|
||||
[yY][eE][sS]|[yY])
|
||||
true
|
||||
;;
|
||||
*)
|
||||
false
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
function INFO {
|
||||
echo -e "\e[1;32m[${_FILE_}]\e[0m ${1}"
|
||||
}
|
||||
|
||||
function WARNING {
|
||||
echo -e "\e[1;33m[${_FILE_}]\e[0m ${1}"
|
||||
CONFIRM && return
|
||||
exit 1
|
||||
}
|
||||
|
||||
function ERROR {
|
||||
echo -e "\e[1;31m[${_FILE_}]\e[0m ${1}"
|
||||
exit 1
|
||||
}
|
||||
|
||||
function TIME_START {
|
||||
t1=`date +%s.%N`
|
||||
}
|
||||
|
||||
function TIME_STOP {
|
||||
t2=`date +%s.%N`
|
||||
dt=`echo "$t2 - $t1" | bc -l`
|
||||
dt=`echo "scale=2; $dt / 1" | bc -l`
|
||||
echo "Done in ${dt}s"
|
||||
}
|
||||
|
||||
# Default configuration
|
||||
if [ -f "${_DIR_}/.lwsrc" ]; then
|
||||
source ${_DIR_}/.lwsrc
|
||||
else
|
||||
ERROR "Config not found! Please create ${_DIR_}/.lwsrc"
|
||||
fi
|
||||
|
||||
# Check configuration
|
||||
if [ -z "${REMOTE_DOMAIN}" ]; then
|
||||
ERROR "Please configure REMOTE_DOMAIN in ${_DIR_}/.lwsrc"
|
||||
fi
|
||||
if [ -z "$REMOTE_HOST" ] || [ -z "$REMOTE_USER" ] || [ -z "$REMOTE_PATH" ]; then
|
||||
ERROR "Please configure REMOVE_HOST / REMOVE_USER / REMOTE_PATH in ${_DIR_}/.lwsrc"
|
||||
fi
|
||||
|
||||
# Change to project root directory
|
||||
cd ${_DIR_}/..
|
||||
|
||||
# Determine local domain
|
||||
if [ -z "${LOCAL_DOMAIN}" ]; then
|
||||
LOCAL_DOMAIN=${REMOTE_DOMAIN#www.}
|
||||
LOCAL_DOMAIN="${LOCAL_DOMAIN%%.*}.${TLD-ledevsimple.ca}"
|
||||
fi
|
||||
if [ -z "${LOCAL_DOMAIN}" ]; then
|
||||
ERROR "Could not determine local domain. Please verify ${_DIR_}/.lwsrc"
|
||||
fi
|
||||
|
||||
# Determine local protocol
|
||||
LOCAL_PROTOCOL="${LOCAL_PROTOCOL-https}"
|
||||
63
scripts/post-create.sh
Executable file
63
scripts/post-create.sh
Executable file
@@ -0,0 +1,63 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
PROJECT=${PWD##*/}
|
||||
DB_NAME="wp_${PROJECT/-/_}"
|
||||
GIT_URL="https://gitea.websimple.com/wp-sites/${PROJECT}.git"
|
||||
GIT_ORIGIN="ssh://git@gitea.websimple.com:222/wp-sites/${PROJECT}.git"
|
||||
|
||||
# Portable in-place sed: use GNU sed's -i -e or BSD/macOS sed's -i '' -e
|
||||
sed_inplace() {
|
||||
local expr="$1"
|
||||
shift || return
|
||||
|
||||
# Detect macOS (Darwin) via uname -s; treat everything else as GNU-like sed
|
||||
local os
|
||||
os="$(uname -s 2>/dev/null || echo Unknown)"
|
||||
|
||||
for f in "$@"; do
|
||||
if [ "$os" = "Darwin" ]; then
|
||||
# macOS/BSD sed requires an explicit empty extension to avoid creating backups
|
||||
sed -i '' -e "$expr" "$f"
|
||||
else
|
||||
# GNU sed supports -i -e without creating backup files
|
||||
sed -i -e "$expr" "$f"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
# Rename project
|
||||
sed_inplace "s/wp-boilerplate/${PROJECT}/g" .cpanel.yml .gitignore composer.json
|
||||
|
||||
# Initialize git repository
|
||||
git init
|
||||
git remote add origin ${GIT_ORIGIN}
|
||||
git fetch origin || error_code=$?
|
||||
if [ "${error_code-0}" -eq 0 ]; then
|
||||
git checkout main -f
|
||||
rm -rf wp-content/mu-plugins/*
|
||||
rm -rf wp-content/plugins/*
|
||||
rm -rf wp-content/themes/*
|
||||
git reset --hard
|
||||
composer install
|
||||
else
|
||||
git remote remove origin
|
||||
git add -A
|
||||
git commit -am 'chore: initial wp-boilerplate project'
|
||||
fi
|
||||
|
||||
# Create database
|
||||
mysql -e "CREATE DATABASE IF NOT EXISTS ${DB_NAME}"
|
||||
|
||||
# Download / configure / install WordPress
|
||||
wp core download --force --skip-content
|
||||
wp core config --dbname=${DB_NAME}
|
||||
|
||||
# Require Composer vendor/autoload.php in wp-config.php
|
||||
VENDOR_AUTOLOAD="if ( file_exists( 'vendor/autoload.php' ) ) { require_once 'vendor/autoload.php'; }"
|
||||
if ! grep -Fq "${VENDOR_AUTOLOAD}" wp-config.php; then
|
||||
sed_inplace "2s|^|${VENDOR_AUTOLOAD}\n|" wp-config.php
|
||||
fi
|
||||
|
||||
# Done
|
||||
echo "Site ready at ${LOCAL_PROTOCOL-https}://${PROJECT}.${TLD-ledevsimple.ca}"
|
||||
59
scripts/update-local.sh
Executable file
59
scripts/update-local.sh
Executable file
@@ -0,0 +1,59 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
source "`dirname $0`/common.sh"
|
||||
|
||||
# Backup database
|
||||
#INFO "Backing up database..."
|
||||
#DB_FILE="${LOCAL_DOMAIN}-${_NOW_}-before-update.sql"
|
||||
#TIME_START
|
||||
#wp db export ${DB_FILE} > ${_LOG_} 2>&1
|
||||
#TIME_STOP
|
||||
|
||||
# Synchronize uploads
|
||||
INFO "Synchronizing uploads..."
|
||||
TIME_START
|
||||
rsync -ave "ssh -p 2222" ${REMOTE_USER}@${REMOTE_HOST}:${REMOTE_PATH}/wp-content/uploads/ wp-content/uploads/ --exclude node_modules --delete > ${_LOG_} 2>&1
|
||||
TIME_STOP
|
||||
|
||||
# Synchronize database
|
||||
INFO "Synchronizing database..."
|
||||
DB_FILE="${REMOTE_DOMAIN}-${_NOW_}.sql"
|
||||
TIME_START
|
||||
ssh -p 2222 ${REMOTE_USER}@${REMOTE_HOST} "cd ${REMOTE_PATH} && wp --allow-root --skip-plugins --skip-themes db export ${DB_FILE}" > ${_LOG_} 2>&1
|
||||
ssh -p 2222 ${REMOTE_USER}@${REMOTE_HOST} "cat ${REMOTE_PATH}/${DB_FILE}" | wp db import - > ${_LOG_} 2>&1
|
||||
ssh -p 2222 ${REMOTE_USER}@${REMOTE_HOST} "rm -f ${REMOTE_PATH}/${DB_FILE}" > ${_LOG_} 2>&1
|
||||
TIME_STOP
|
||||
|
||||
# Replace domain
|
||||
INFO "Replacing domain ${REMOTE_DOMAIN} => ${LOCAL_DOMAIN}..."
|
||||
TIME_START
|
||||
wp --skip-plugins --skip-themes search-replace "https://${REMOTE_DOMAIN}" "${LOCAL_PROTOCOL}://${LOCAL_DOMAIN}" --all-tables > ${_LOG_} 2>&1
|
||||
TIME_STOP
|
||||
|
||||
# Deactivate plugins
|
||||
INFO "Deactivating plugins..."
|
||||
TIME_START
|
||||
wp --skip-plugins --skip-themes plugin deactivate \
|
||||
cookie-law-info \
|
||||
ithemes-security-pro \
|
||||
wp-offload-ses \
|
||||
> ${_LOG_} 2>&1 || true \
|
||||
TIME_STOP
|
||||
|
||||
# Activate plugins
|
||||
INFO "Activating plugins..."
|
||||
TIME_START
|
||||
wp --skip-plugins --skip-themes plugin install --activate \
|
||||
disable-emails \
|
||||
loco-translate \
|
||||
wp-mail-logging \
|
||||
> ${_LOG_} 2>&1 || true \
|
||||
TIME_STOP
|
||||
|
||||
# Flush permalinks
|
||||
INFO "Flushing permalinks..."
|
||||
TIME_START
|
||||
wp rewrite flush --hard > ${_LOG_} 2>&1
|
||||
TIME_STOP
|
||||
|
||||
INFO "Local development site ready: ${LOCAL_PROTOCOL}://${LOCAL_DOMAIN}"
|
||||
0
wp-content/mu-plugins/.gitkeep
Normal file
0
wp-content/mu-plugins/.gitkeep
Normal file
9
wp-content/mu-plugins/umami.php
Normal file
9
wp-content/mu-plugins/umami.php
Normal file
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
// Inject the Umami tracking code into the <head> of the site
|
||||
// add_action( 'wp_head', 'umami_wp_head' );
|
||||
function umami_wp_head() {
|
||||
?>
|
||||
<script defer src="https://umami.websimple.com/script" data-website-id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"></script>
|
||||
<?php
|
||||
}
|
||||
0
wp-content/plugins/.gitkeep
Normal file
0
wp-content/plugins/.gitkeep
Normal file
0
wp-content/themes/.gitkeep
Normal file
0
wp-content/themes/.gitkeep
Normal file
Reference in New Issue
Block a user