first commit
This commit is contained in:
284
.ddev/config.yaml
Normal file
284
.ddev/config.yaml
Normal file
@@ -0,0 +1,284 @@
|
|||||||
|
name: my-blog
|
||||||
|
type: wordpress
|
||||||
|
docroot: "web"
|
||||||
|
php_version: "8.2"
|
||||||
|
webserver_type: nginx-fpm
|
||||||
|
xdebug_enabled: false
|
||||||
|
additional_hostnames: []
|
||||||
|
additional_fqdns: []
|
||||||
|
database:
|
||||||
|
type: mysql
|
||||||
|
version: "8.0"
|
||||||
|
use_dns_when_possible: true
|
||||||
|
composer_version: "2"
|
||||||
|
web_environment: []
|
||||||
|
corepack_enable: false
|
||||||
|
|
||||||
|
# Key features of DDEV's config.yaml:
|
||||||
|
|
||||||
|
# name: <projectname> # Name of the project, automatically provides
|
||||||
|
# http://projectname.ddev.site and https://projectname.ddev.site
|
||||||
|
|
||||||
|
# type: <projecttype> # backdrop, craftcms, django4, drupal, drupal6, drupal7, laravel, magento, magento2, php, python, shopware6, silverstripe, typo3, wordpress
|
||||||
|
# See https://ddev.readthedocs.io/en/stable/users/quickstart/ for more
|
||||||
|
# information on the different project types
|
||||||
|
# "drupal" covers recent Drupal 8+
|
||||||
|
|
||||||
|
# docroot: <relative_path> # Relative path to the directory containing index.php.
|
||||||
|
|
||||||
|
# php_version: "8.2" # PHP version to use, "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"
|
||||||
|
|
||||||
|
# You can explicitly specify the webimage but this
|
||||||
|
# is not recommended, as the images are often closely tied to DDEV's' behavior,
|
||||||
|
# so this can break upgrades.
|
||||||
|
|
||||||
|
# webimage: <docker_image> # nginx/php docker image.
|
||||||
|
|
||||||
|
# database:
|
||||||
|
# type: <dbtype> # mysql, mariadb, postgres
|
||||||
|
# version: <version> # database version, like "10.11" or "8.0"
|
||||||
|
# MariaDB versions can be 5.5-10.8, 10.11, and 11.4.
|
||||||
|
# MySQL versions can be 5.5-8.0.
|
||||||
|
# PostgreSQL versions can be 9-16.
|
||||||
|
|
||||||
|
# router_http_port: <port> # Port to be used for http (defaults to global configuration, usually 80)
|
||||||
|
# router_https_port: <port> # Port for https (defaults to global configuration, usually 443)
|
||||||
|
|
||||||
|
# xdebug_enabled: false # Set to true to enable Xdebug and "ddev start" or "ddev restart"
|
||||||
|
# Note that for most people the commands
|
||||||
|
# "ddev xdebug" to enable Xdebug and "ddev xdebug off" to disable it work better,
|
||||||
|
# as leaving Xdebug enabled all the time is a big performance hit.
|
||||||
|
|
||||||
|
# xhprof_enabled: false # Set to true to enable Xhprof and "ddev start" or "ddev restart"
|
||||||
|
# Note that for most people the commands
|
||||||
|
# "ddev xhprof" to enable Xhprof and "ddev xhprof off" to disable it work better,
|
||||||
|
# as leaving Xhprof enabled all the time is a big performance hit.
|
||||||
|
|
||||||
|
# webserver_type: nginx-fpm, apache-fpm, or nginx-gunicorn
|
||||||
|
|
||||||
|
# timezone: Europe/Berlin
|
||||||
|
# This is the timezone used in the containers and by PHP;
|
||||||
|
# it can be set to any valid timezone,
|
||||||
|
# see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
|
||||||
|
# For example Europe/Dublin or MST7MDT
|
||||||
|
|
||||||
|
# composer_root: <relative_path>
|
||||||
|
# Relative path to the Composer root directory from the project root. This is
|
||||||
|
# the directory which contains the composer.json and where all Composer related
|
||||||
|
# commands are executed.
|
||||||
|
|
||||||
|
# composer_version: "2"
|
||||||
|
# You can set it to "" or "2" (default) for Composer v2 or "1" for Composer v1
|
||||||
|
# to use the latest major version available at the time your container is built.
|
||||||
|
# It is also possible to use each other Composer version channel. This includes:
|
||||||
|
# - 2.2 (latest Composer LTS version)
|
||||||
|
# - stable
|
||||||
|
# - preview
|
||||||
|
# - snapshot
|
||||||
|
# Alternatively, an explicit Composer version may be specified, for example "2.2.18".
|
||||||
|
# To reinstall Composer after the image was built, run "ddev debug refresh".
|
||||||
|
|
||||||
|
# nodejs_version: "20"
|
||||||
|
# change from the default system Node.js version to any other version.
|
||||||
|
# Numeric version numbers can be complete (i.e. 18.15.0) or
|
||||||
|
# incomplete (18, 17.2, 16). 'lts' and 'latest' can be used as well along with
|
||||||
|
# other named releases.
|
||||||
|
# see https://www.npmjs.com/package/n#specifying-nodejs-versions
|
||||||
|
# Note that you can continue using 'ddev nvm' or nvm inside the web container
|
||||||
|
# to change the project's installed node version if you need to.
|
||||||
|
|
||||||
|
# corepack_enable: false
|
||||||
|
# Change to 'true' to 'corepack enable' and gain access to latest versions of yarn/pnpm
|
||||||
|
|
||||||
|
# additional_hostnames:
|
||||||
|
# - somename
|
||||||
|
# - someothername
|
||||||
|
# would provide http and https URLs for "somename.ddev.site"
|
||||||
|
# and "someothername.ddev.site".
|
||||||
|
|
||||||
|
# additional_fqdns:
|
||||||
|
# - example.com
|
||||||
|
# - sub1.example.com
|
||||||
|
# would provide http and https URLs for "example.com" and "sub1.example.com"
|
||||||
|
# Please take care with this because it can cause great confusion.
|
||||||
|
|
||||||
|
# upload_dirs: "custom/upload/dir"
|
||||||
|
#
|
||||||
|
# upload_dirs:
|
||||||
|
# - custom/upload/dir
|
||||||
|
# - ../private
|
||||||
|
#
|
||||||
|
# would set the destination paths for ddev import-files to <docroot>/custom/upload/dir
|
||||||
|
# When Mutagen is enabled this path is bind-mounted so that all the files
|
||||||
|
# in the upload_dirs don't have to be synced into Mutagen.
|
||||||
|
|
||||||
|
# disable_upload_dirs_warning: false
|
||||||
|
# If true, turns off the normal warning that says
|
||||||
|
# "You have Mutagen enabled and your 'php' project type doesn't have upload_dirs set"
|
||||||
|
|
||||||
|
# ddev_version_constraint: ""
|
||||||
|
# Example:
|
||||||
|
# ddev_version_constraint: ">= 1.22.4"
|
||||||
|
# This will enforce that the running ddev version is within this constraint.
|
||||||
|
# See https://github.com/Masterminds/semver#checking-version-constraints for
|
||||||
|
# supported constraint formats
|
||||||
|
|
||||||
|
# working_dir:
|
||||||
|
# web: /var/www/html
|
||||||
|
# db: /home
|
||||||
|
# would set the default working directory for the web and db services.
|
||||||
|
# These values specify the destination directory for ddev ssh and the
|
||||||
|
# directory in which commands passed into ddev exec are run.
|
||||||
|
|
||||||
|
# omit_containers: [db, ddev-ssh-agent]
|
||||||
|
# Currently only these containers are supported. Some containers can also be
|
||||||
|
# omitted globally in the ~/.ddev/global_config.yaml. Note that if you omit
|
||||||
|
# the "db" container, several standard features of DDEV that access the
|
||||||
|
# database container will be unusable. In the global configuration it is also
|
||||||
|
# possible to omit ddev-router, but not here.
|
||||||
|
|
||||||
|
# performance_mode: "global"
|
||||||
|
# DDEV offers performance optimization strategies to improve the filesystem
|
||||||
|
# performance depending on your host system. Should be configured globally.
|
||||||
|
#
|
||||||
|
# If set, will override the global config. Possible values are:
|
||||||
|
# - "global": uses the value from the global config.
|
||||||
|
# - "none": disables performance optimization for this project.
|
||||||
|
# - "mutagen": enables Mutagen for this project.
|
||||||
|
# - "nfs": enables NFS for this project.
|
||||||
|
#
|
||||||
|
# See https://ddev.readthedocs.io/en/stable/users/install/performance/#nfs
|
||||||
|
# See https://ddev.readthedocs.io/en/stable/users/install/performance/#mutagen
|
||||||
|
|
||||||
|
# fail_on_hook_fail: False
|
||||||
|
# Decide whether 'ddev start' should be interrupted by a failing hook
|
||||||
|
|
||||||
|
# host_https_port: "59002"
|
||||||
|
# The host port binding for https can be explicitly specified. It is
|
||||||
|
# dynamic unless otherwise specified.
|
||||||
|
# This is not used by most people, most people use the *router* instead
|
||||||
|
# of the localhost port.
|
||||||
|
|
||||||
|
# host_webserver_port: "59001"
|
||||||
|
# The host port binding for the ddev-webserver can be explicitly specified. It is
|
||||||
|
# dynamic unless otherwise specified.
|
||||||
|
# This is not used by most people, most people use the *router* instead
|
||||||
|
# of the localhost port.
|
||||||
|
|
||||||
|
# host_db_port: "59002"
|
||||||
|
# The host port binding for the ddev-dbserver can be explicitly specified. It is dynamic
|
||||||
|
# unless explicitly specified.
|
||||||
|
|
||||||
|
# mailpit_http_port: "8025"
|
||||||
|
# mailpit_https_port: "8026"
|
||||||
|
# The Mailpit ports can be changed from the default 8025 and 8026
|
||||||
|
|
||||||
|
# host_mailpit_port: "8025"
|
||||||
|
# The mailpit port is not normally bound on the host at all, instead being routed
|
||||||
|
# through ddev-router, but it can be bound directly to localhost if specified here.
|
||||||
|
|
||||||
|
# webimage_extra_packages: [php7.4-tidy, php-bcmath]
|
||||||
|
# Extra Debian packages that are needed in the webimage can be added here
|
||||||
|
|
||||||
|
# dbimage_extra_packages: [telnet,netcat]
|
||||||
|
# Extra Debian packages that are needed in the dbimage can be added here
|
||||||
|
|
||||||
|
# use_dns_when_possible: true
|
||||||
|
# If the host has internet access and the domain configured can
|
||||||
|
# successfully be looked up, DNS will be used for hostname resolution
|
||||||
|
# instead of editing /etc/hosts
|
||||||
|
# Defaults to true
|
||||||
|
|
||||||
|
# project_tld: ddev.site
|
||||||
|
# The top-level domain used for project URLs
|
||||||
|
# The default "ddev.site" allows DNS lookup via a wildcard
|
||||||
|
# If you prefer you can change this to "ddev.local" to preserve
|
||||||
|
# pre-v1.9 behavior.
|
||||||
|
|
||||||
|
# ngrok_args: --basic-auth username:pass1234
|
||||||
|
# Provide extra flags to the "ngrok http" command, see
|
||||||
|
# https://ngrok.com/docs/ngrok-agent/config or run "ngrok http -h"
|
||||||
|
|
||||||
|
# disable_settings_management: false
|
||||||
|
# If true, DDEV will not create CMS-specific settings files like
|
||||||
|
# Drupal's settings.php/settings.ddev.php or TYPO3's additional.php
|
||||||
|
# In this case the user must provide all such settings.
|
||||||
|
|
||||||
|
# You can inject environment variables into the web container with:
|
||||||
|
# web_environment:
|
||||||
|
# - SOMEENV=somevalue
|
||||||
|
# - SOMEOTHERENV=someothervalue
|
||||||
|
|
||||||
|
# no_project_mount: false
|
||||||
|
# (Experimental) If true, DDEV will not mount the project into the web container;
|
||||||
|
# the user is responsible for mounting it manually or via a script.
|
||||||
|
# This is to enable experimentation with alternate file mounting strategies.
|
||||||
|
# For advanced users only!
|
||||||
|
|
||||||
|
# bind_all_interfaces: false
|
||||||
|
# If true, host ports will be bound on all network interfaces,
|
||||||
|
# not the localhost interface only. This means that ports
|
||||||
|
# will be available on the local network if the host firewall
|
||||||
|
# allows it.
|
||||||
|
|
||||||
|
# default_container_timeout: 120
|
||||||
|
# The default time that DDEV waits for all containers to become ready can be increased from
|
||||||
|
# the default 120. This helps in importing huge databases, for example.
|
||||||
|
|
||||||
|
#web_extra_exposed_ports:
|
||||||
|
#- name: nodejs
|
||||||
|
# container_port: 3000
|
||||||
|
# http_port: 2999
|
||||||
|
# https_port: 3000
|
||||||
|
#- name: something
|
||||||
|
# container_port: 4000
|
||||||
|
# https_port: 4000
|
||||||
|
# http_port: 3999
|
||||||
|
# Allows a set of extra ports to be exposed via ddev-router
|
||||||
|
# Fill in all three fields even if you don’t intend to use the https_port!
|
||||||
|
# If you don’t add https_port, then it defaults to 0 and ddev-router will fail to start.
|
||||||
|
#
|
||||||
|
# The port behavior on the ddev-webserver must be arranged separately, for example
|
||||||
|
# using web_extra_daemons.
|
||||||
|
# For example, with a web app on port 3000 inside the container, this config would
|
||||||
|
# expose that web app on https://<project>.ddev.site:9999 and http://<project>.ddev.site:9998
|
||||||
|
# web_extra_exposed_ports:
|
||||||
|
# - name: myapp
|
||||||
|
# container_port: 3000
|
||||||
|
# http_port: 9998
|
||||||
|
# https_port: 9999
|
||||||
|
|
||||||
|
#web_extra_daemons:
|
||||||
|
#- name: "http-1"
|
||||||
|
# command: "/var/www/html/node_modules/.bin/http-server -p 3000"
|
||||||
|
# directory: /var/www/html
|
||||||
|
#- name: "http-2"
|
||||||
|
# command: "/var/www/html/node_modules/.bin/http-server /var/www/html/sub -p 3000"
|
||||||
|
# directory: /var/www/html
|
||||||
|
|
||||||
|
# override_config: false
|
||||||
|
# By default, config.*.yaml files are *merged* into the configuration
|
||||||
|
# But this means that some things can't be overridden
|
||||||
|
# For example, if you have 'use_dns_when_possible: true'' you can't override it with a merge
|
||||||
|
# and you can't erase existing hooks or all environment variables.
|
||||||
|
# However, with "override_config: true" in a particular config.*.yaml file,
|
||||||
|
# 'use_dns_when_possible: false' can override the existing values, and
|
||||||
|
# hooks:
|
||||||
|
# post-start: []
|
||||||
|
# or
|
||||||
|
# web_environment: []
|
||||||
|
# or
|
||||||
|
# additional_hostnames: []
|
||||||
|
# can have their intended affect. 'override_config' affects only behavior of the
|
||||||
|
# config.*.yaml file it exists in.
|
||||||
|
|
||||||
|
# Many DDEV commands can be extended to run tasks before or after the
|
||||||
|
# DDEV command is executed, for example "post-start", "post-import-db",
|
||||||
|
# "pre-composer", "post-composer"
|
||||||
|
# See https://ddev.readthedocs.io/en/stable/users/extend/custom-commands/ for more
|
||||||
|
# information on the commands that can be extended and the tasks you can define
|
||||||
|
# for them. Example:
|
||||||
|
hooks:
|
||||||
|
# Un-comment to emit the WP CLI version after ddev start.
|
||||||
|
post-start:
|
||||||
|
- exec: wp cli version
|
||||||
28
.env.example
Normal file
28
.env.example
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
DB_NAME='database_name'
|
||||||
|
DB_USER='database_user'
|
||||||
|
DB_PASSWORD='database_password'
|
||||||
|
|
||||||
|
# Optionally, you can use a data source name (DSN)
|
||||||
|
# When using a DSN, you can remove the DB_NAME, DB_USER, DB_PASSWORD, and DB_HOST variables
|
||||||
|
# DATABASE_URL='mysql://database_user:database_password@database_host:database_port/database_name'
|
||||||
|
|
||||||
|
# Optional database variables
|
||||||
|
# DB_HOST='localhost'
|
||||||
|
# DB_PREFIX='wp_'
|
||||||
|
|
||||||
|
WP_ENV='development'
|
||||||
|
WP_HOME='http://example.com'
|
||||||
|
WP_SITEURL="${WP_HOME}/wp"
|
||||||
|
|
||||||
|
# Specify optional debug.log path
|
||||||
|
# WP_DEBUG_LOG='/path/to/debug.log'
|
||||||
|
|
||||||
|
# Generate your keys here: https://roots.io/salts.html
|
||||||
|
AUTH_KEY='generateme'
|
||||||
|
SECURE_AUTH_KEY='generateme'
|
||||||
|
LOGGED_IN_KEY='generateme'
|
||||||
|
NONCE_KEY='generateme'
|
||||||
|
AUTH_SALT='generateme'
|
||||||
|
SECURE_AUTH_SALT='generateme'
|
||||||
|
LOGGED_IN_SALT='generateme'
|
||||||
|
NONCE_SALT='generateme'
|
||||||
27
.gitignore
vendored
Normal file
27
.gitignore
vendored
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
# Application
|
||||||
|
web/app/plugins/*
|
||||||
|
!web/app/plugins/.gitkeep
|
||||||
|
web/app/mu-plugins/*/
|
||||||
|
web/app/themes/twentytwentyfive/
|
||||||
|
web/app/upgrade
|
||||||
|
web/app/uploads/*
|
||||||
|
!web/app/uploads/.gitkeep
|
||||||
|
web/app/cache/*
|
||||||
|
|
||||||
|
# WordPress
|
||||||
|
web/wp
|
||||||
|
web/.htaccess
|
||||||
|
|
||||||
|
# Logs
|
||||||
|
*.log
|
||||||
|
|
||||||
|
# Dotenv
|
||||||
|
.env
|
||||||
|
.env.*
|
||||||
|
!.env.example
|
||||||
|
|
||||||
|
# Composer
|
||||||
|
/vendor
|
||||||
|
|
||||||
|
# WP-CLI
|
||||||
|
wp-cli.local.yml
|
||||||
19
LICENSE.md
Normal file
19
LICENSE.md
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
Copyright (c) Roots Software LLC
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||||
|
this software and associated documentation files (the "Software"), to deal in
|
||||||
|
the Software without restriction, including without limitation the rights to
|
||||||
|
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
||||||
|
of the Software, and to permit persons to whom the Software is furnished to do
|
||||||
|
so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
62
README.md
Normal file
62
README.md
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
<p align="center">
|
||||||
|
<a href="https://roots.io/bedrock/">
|
||||||
|
<img alt="Bedrock" src="https://cdn.roots.io/app/uploads/logo-bedrock.svg" height="100">
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p align="center">
|
||||||
|
<a href="https://packagist.org/packages/roots/bedrock">
|
||||||
|
<img alt="Packagist Installs" src="https://img.shields.io/packagist/dt/roots/bedrock?label=projects%20created&colorB=2b3072&colorA=525ddc&style=flat-square">
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<a href="https://packagist.org/packages/roots/wordpress">
|
||||||
|
<img alt="roots/wordpress Packagist Downloads" src="https://img.shields.io/packagist/dt/roots/wordpress?label=roots%2Fwordpress%20downloads&logo=roots&logoColor=white&colorB=2b3072&colorA=525ddc&style=flat-square">
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<img src="https://img.shields.io/badge/dynamic/json.svg?url=https://raw.githubusercontent.com/roots/bedrock/master/composer.json&label=wordpress&logo=roots&logoColor=white&query=$.require[%22roots/wordpress%22]&colorB=2b3072&colorA=525ddc&style=flat-square">
|
||||||
|
|
||||||
|
<a href="https://github.com/roots/bedrock/actions/workflows/ci.yml">
|
||||||
|
<img alt="Build Status" src="https://img.shields.io/github/actions/workflow/status/roots/bedrock/ci.yml?branch=master&logo=github&label=CI&style=flat-square">
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<a href="https://twitter.com/rootswp">
|
||||||
|
<img alt="Follow Roots" src="https://img.shields.io/badge/follow%20@rootswp-1da1f2?logo=twitter&logoColor=ffffff&message=&style=flat-square">
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p align="center">WordPress boilerplate with Composer, easier configuration, and an improved folder structure</p>
|
||||||
|
|
||||||
|
<p align="center">
|
||||||
|
<a href="https://roots.io/bedrock/">Website</a> <a href="https://roots.io/bedrock/docs/installation/">Documentation</a> <a href="https://github.com/roots/bedrock/releases">Releases</a> <a href="https://discourse.roots.io/">Community</a>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
## Sponsors
|
||||||
|
|
||||||
|
Bedrock is an open source project and completely free to use. If you've benefited from our projects and would like to support our future endeavors, please consider [sponsoring Roots](https://github.com/sponsors/roots).
|
||||||
|
|
||||||
|
<div align="center">
|
||||||
|
<a href="https://carrot.com/"><img src="https://cdn.roots.io/app/uploads/carrot.svg" alt="Carrot" width="120" height="90"></a> <a href="https://wordpress.com/"><img src="https://cdn.roots.io/app/uploads/wordpress.svg" alt="WordPress.com" width="120" height="90"></a> <a href="https://worksitesafety.ca/careers/"><img src="https://cdn.roots.io/app/uploads/worksite-safety.svg" alt="Worksite Safety" width="120" height="90"></a> <a href="https://www.itineris.co.uk/"><img src="https://cdn.roots.io/app/uploads/itineris.svg" alt="Itineris" width="120" height="90"></a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
## Overview
|
||||||
|
|
||||||
|
Bedrock is a WordPress boilerplate for developers that want to manage their projects with Git and Composer. Much of the philosophy behind Bedrock is inspired by the [Twelve-Factor App](http://12factor.net/) methodology, including the [WordPress specific version](https://roots.io/twelve-factor-wordpress/).
|
||||||
|
|
||||||
|
- Better folder structure
|
||||||
|
- Dependency management with [Composer](https://getcomposer.org)
|
||||||
|
- Easy WordPress configuration with environment specific files
|
||||||
|
- Environment variables with [Dotenv](https://github.com/vlucas/phpdotenv)
|
||||||
|
- Autoloader for mu-plugins (use regular plugins as mu-plugins)
|
||||||
|
- Enhanced security (separated web root and secure passwords with [wp-password-bcrypt](https://github.com/roots/wp-password-bcrypt))
|
||||||
|
|
||||||
|
## Getting Started
|
||||||
|
|
||||||
|
See the [Bedrock installation documentation](https://roots.io/bedrock/docs/installation/).
|
||||||
|
|
||||||
|
## Stay Connected
|
||||||
|
|
||||||
|
- Join us on Discord by [sponsoring us on GitHub](https://github.com/sponsors/roots)
|
||||||
|
- Participate on [Roots Discourse](https://discourse.roots.io/)
|
||||||
|
- Follow [@rootswp on Twitter](https://twitter.com/rootswp)
|
||||||
|
- Read the [Roots Blog](https://roots.io/blog/)
|
||||||
|
- Subscribe to the [Roots Newsletter](https://roots.io/newsletter/)
|
||||||
71
composer.json
Normal file
71
composer.json
Normal file
@@ -0,0 +1,71 @@
|
|||||||
|
{
|
||||||
|
"name": "roots/bedrock",
|
||||||
|
"type": "project",
|
||||||
|
"license": "MIT",
|
||||||
|
"description": "WordPress boilerplate with Composer, easier configuration, and an improved folder structure",
|
||||||
|
"homepage": "https://roots.io/bedrock/",
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Scott Walkinshaw",
|
||||||
|
"email": "scott.walkinshaw@gmail.com",
|
||||||
|
"homepage": "https://github.com/swalkinshaw"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Ben Word",
|
||||||
|
"email": "ben@benword.com",
|
||||||
|
"homepage": "https://github.com/retlehs"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"keywords": [
|
||||||
|
"bedrock", "composer", "roots", "wordpress", "wp", "wp-config"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/roots/bedrock/issues",
|
||||||
|
"forum": "https://discourse.roots.io/category/bedrock"
|
||||||
|
},
|
||||||
|
"repositories": [
|
||||||
|
{
|
||||||
|
"type": "composer",
|
||||||
|
"url": "https://wpackagist.org",
|
||||||
|
"only": ["wpackagist-plugin/*", "wpackagist-theme/*"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"require": {
|
||||||
|
"php": ">=8.1",
|
||||||
|
"composer/installers": "^2.2",
|
||||||
|
"vlucas/phpdotenv": "^5.5",
|
||||||
|
"oscarotero/env": "^2.1",
|
||||||
|
"roots/bedrock-autoloader": "^1.0",
|
||||||
|
"roots/bedrock-disallow-indexing": "^2.0",
|
||||||
|
"roots/wordpress": "^6.7",
|
||||||
|
"roots/wp-config": "1.0.0",
|
||||||
|
"roots/wp-password-bcrypt": "1.2.0",
|
||||||
|
"wpackagist-theme/twentytwentyfive": "^1.0"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"roave/security-advisories": "dev-latest",
|
||||||
|
"laravel/pint": "^1.18"
|
||||||
|
},
|
||||||
|
"config": {
|
||||||
|
"optimize-autoloader": true,
|
||||||
|
"preferred-install": "dist",
|
||||||
|
"allow-plugins": {
|
||||||
|
"composer/installers": true,
|
||||||
|
"roots/wordpress-core-installer": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"minimum-stability": "dev",
|
||||||
|
"prefer-stable": true,
|
||||||
|
"extra": {
|
||||||
|
"installer-paths": {
|
||||||
|
"web/app/mu-plugins/{$name}/": ["type:wordpress-muplugin"],
|
||||||
|
"web/app/plugins/{$name}/": ["type:wordpress-plugin"],
|
||||||
|
"web/app/themes/{$name}/": ["type:wordpress-theme"]
|
||||||
|
},
|
||||||
|
"wordpress-install-dir": "web/wp"
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"lint": "pint --test",
|
||||||
|
"lint:fix": "pint"
|
||||||
|
}
|
||||||
|
}
|
||||||
1609
composer.lock
generated
Normal file
1609
composer.lock
generated
Normal file
File diff suppressed because it is too large
Load Diff
166
config/application.php
Normal file
166
config/application.php
Normal file
@@ -0,0 +1,166 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Your base production configuration goes in this file. Environment-specific
|
||||||
|
* overrides go in their respective config/environments/{{WP_ENV}}.php file.
|
||||||
|
*
|
||||||
|
* A good default policy is to deviate from the production config as little as
|
||||||
|
* possible. Try to define as much of your configuration in this file as you
|
||||||
|
* can.
|
||||||
|
*/
|
||||||
|
|
||||||
|
use Roots\WPConfig\Config;
|
||||||
|
|
||||||
|
use function Env\env;
|
||||||
|
|
||||||
|
// USE_ENV_ARRAY + CONVERT_* + STRIP_QUOTES
|
||||||
|
Env\Env::$options = 31;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Directory containing all of the site's files
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
$root_dir = dirname(__DIR__);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Document Root
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
$webroot_dir = $root_dir . '/web';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Use Dotenv to set required environment variables and load .env file in root
|
||||||
|
* .env.local will override .env if it exists
|
||||||
|
*/
|
||||||
|
if (file_exists($root_dir . '/.env')) {
|
||||||
|
$env_files = file_exists($root_dir . '/.env.local')
|
||||||
|
? ['.env', '.env.local']
|
||||||
|
: ['.env'];
|
||||||
|
|
||||||
|
$repository = Dotenv\Repository\RepositoryBuilder::createWithNoAdapters()
|
||||||
|
->addAdapter(Dotenv\Repository\Adapter\EnvConstAdapter::class)
|
||||||
|
->addAdapter(Dotenv\Repository\Adapter\PutenvAdapter::class)
|
||||||
|
->immutable()
|
||||||
|
->make();
|
||||||
|
|
||||||
|
$dotenv = Dotenv\Dotenv::create($repository, $root_dir, $env_files, false);
|
||||||
|
$dotenv->load();
|
||||||
|
|
||||||
|
$dotenv->required(['WP_HOME', 'WP_SITEURL']);
|
||||||
|
if (!env('DATABASE_URL')) {
|
||||||
|
$dotenv->required(['DB_NAME', 'DB_USER', 'DB_PASSWORD']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set up our global environment constant and load its config first
|
||||||
|
* Default: production
|
||||||
|
*/
|
||||||
|
define('WP_ENV', env('WP_ENV') ?: 'production');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Infer WP_ENVIRONMENT_TYPE based on WP_ENV
|
||||||
|
*/
|
||||||
|
if (!env('WP_ENVIRONMENT_TYPE') && in_array(WP_ENV, ['production', 'staging', 'development', 'local'])) {
|
||||||
|
Config::define('WP_ENVIRONMENT_TYPE', WP_ENV);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* URLs
|
||||||
|
*/
|
||||||
|
Config::define('WP_HOME', env('WP_HOME'));
|
||||||
|
Config::define('WP_SITEURL', env('WP_SITEURL'));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Custom Content Directory
|
||||||
|
*/
|
||||||
|
Config::define('CONTENT_DIR', '/app');
|
||||||
|
Config::define('WP_CONTENT_DIR', $webroot_dir . Config::get('CONTENT_DIR'));
|
||||||
|
Config::define('WP_CONTENT_URL', Config::get('WP_HOME') . Config::get('CONTENT_DIR'));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* DB settings
|
||||||
|
*/
|
||||||
|
if (env('DB_SSL')) {
|
||||||
|
Config::define('MYSQL_CLIENT_FLAGS', MYSQLI_CLIENT_SSL);
|
||||||
|
}
|
||||||
|
|
||||||
|
Config::define('DB_NAME', env('DB_NAME'));
|
||||||
|
Config::define('DB_USER', env('DB_USER'));
|
||||||
|
Config::define('DB_PASSWORD', env('DB_PASSWORD'));
|
||||||
|
Config::define('DB_HOST', env('DB_HOST') ?: 'localhost');
|
||||||
|
Config::define('DB_CHARSET', 'utf8mb4');
|
||||||
|
Config::define('DB_COLLATE', '');
|
||||||
|
$table_prefix = env('DB_PREFIX') ?: 'wp_';
|
||||||
|
|
||||||
|
if (env('DATABASE_URL')) {
|
||||||
|
$dsn = (object) parse_url(env('DATABASE_URL'));
|
||||||
|
|
||||||
|
Config::define('DB_NAME', substr($dsn->path, 1));
|
||||||
|
Config::define('DB_USER', $dsn->user);
|
||||||
|
Config::define('DB_PASSWORD', isset($dsn->pass) ? $dsn->pass : null);
|
||||||
|
Config::define('DB_HOST', isset($dsn->port) ? "{$dsn->host}:{$dsn->port}" : $dsn->host);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Authentication Unique Keys and Salts
|
||||||
|
*/
|
||||||
|
Config::define('AUTH_KEY', env('AUTH_KEY'));
|
||||||
|
Config::define('SECURE_AUTH_KEY', env('SECURE_AUTH_KEY'));
|
||||||
|
Config::define('LOGGED_IN_KEY', env('LOGGED_IN_KEY'));
|
||||||
|
Config::define('NONCE_KEY', env('NONCE_KEY'));
|
||||||
|
Config::define('AUTH_SALT', env('AUTH_SALT'));
|
||||||
|
Config::define('SECURE_AUTH_SALT', env('SECURE_AUTH_SALT'));
|
||||||
|
Config::define('LOGGED_IN_SALT', env('LOGGED_IN_SALT'));
|
||||||
|
Config::define('NONCE_SALT', env('NONCE_SALT'));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Custom Settings
|
||||||
|
*/
|
||||||
|
Config::define('AUTOMATIC_UPDATER_DISABLED', true);
|
||||||
|
Config::define('DISABLE_WP_CRON', env('DISABLE_WP_CRON') ?: false);
|
||||||
|
|
||||||
|
// Disable the plugin and theme file editor in the admin
|
||||||
|
Config::define('DISALLOW_FILE_EDIT', true);
|
||||||
|
|
||||||
|
// Disable plugin and theme updates and installation from the admin
|
||||||
|
Config::define('DISALLOW_FILE_MODS', true);
|
||||||
|
|
||||||
|
// Limit the number of post revisions
|
||||||
|
Config::define('WP_POST_REVISIONS', env('WP_POST_REVISIONS') ?? true);
|
||||||
|
|
||||||
|
// Disable script concatenation
|
||||||
|
Config::define('CONCATENATE_SCRIPTS', false);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Debugging Settings
|
||||||
|
*/
|
||||||
|
Config::define('WP_DEBUG_DISPLAY', false);
|
||||||
|
Config::define('WP_DEBUG_LOG', false);
|
||||||
|
Config::define('SCRIPT_DEBUG', false);
|
||||||
|
ini_set('display_errors', '0');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Allow WordPress to detect HTTPS when used behind a reverse proxy or a load balancer
|
||||||
|
* See https://codex.wordpress.org/Function_Reference/is_ssl#Notes
|
||||||
|
*/
|
||||||
|
if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https') {
|
||||||
|
$_SERVER['HTTPS'] = 'on';
|
||||||
|
}
|
||||||
|
|
||||||
|
$env_config = __DIR__ . '/environments/' . WP_ENV . '.php';
|
||||||
|
|
||||||
|
if (file_exists($env_config)) {
|
||||||
|
require_once $env_config;
|
||||||
|
}
|
||||||
|
|
||||||
|
Config::apply();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Bootstrap WordPress
|
||||||
|
*/
|
||||||
|
if (!defined('ABSPATH')) {
|
||||||
|
define('ABSPATH', $webroot_dir . '/wp/');
|
||||||
|
}
|
||||||
22
config/environments/development.php
Normal file
22
config/environments/development.php
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Configuration overrides for WP_ENV === 'development'
|
||||||
|
*/
|
||||||
|
|
||||||
|
use Roots\WPConfig\Config;
|
||||||
|
|
||||||
|
use function Env\env;
|
||||||
|
|
||||||
|
Config::define('SAVEQUERIES', true);
|
||||||
|
Config::define('WP_DEBUG', true);
|
||||||
|
Config::define('WP_DEBUG_DISPLAY', true);
|
||||||
|
Config::define('WP_DEBUG_LOG', env('WP_DEBUG_LOG') ?? true);
|
||||||
|
Config::define('WP_DISABLE_FATAL_ERROR_HANDLER', true);
|
||||||
|
Config::define('SCRIPT_DEBUG', true);
|
||||||
|
Config::define('DISALLOW_INDEXING', true);
|
||||||
|
|
||||||
|
ini_set('display_errors', '1');
|
||||||
|
|
||||||
|
// Enable plugin and theme updates and installation from the admin
|
||||||
|
Config::define('DISALLOW_FILE_MODS', false);
|
||||||
18
config/environments/staging.php
Normal file
18
config/environments/staging.php
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Configuration overrides for WP_ENV === 'staging'
|
||||||
|
*/
|
||||||
|
|
||||||
|
use Roots\WPConfig\Config;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* You should try to keep staging as close to production as possible. However,
|
||||||
|
* should you need to, you can always override production configuration values
|
||||||
|
* with `Config::define`.
|
||||||
|
*
|
||||||
|
* Example: `Config::define('WP_DEBUG', true);`
|
||||||
|
* Example: `Config::define('DISALLOW_FILE_MODS', false);`
|
||||||
|
*/
|
||||||
|
|
||||||
|
Config::define('DISALLOW_INDEXING', true);
|
||||||
9
pint.json
Normal file
9
pint.json
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"preset": "per",
|
||||||
|
"exclude": [
|
||||||
|
"web/wp",
|
||||||
|
"web/app/mu-plugins/bedrock-disallow-indexing",
|
||||||
|
"web/app/plugins",
|
||||||
|
"web/app/themes/twentytwentyfive"
|
||||||
|
]
|
||||||
|
}
|
||||||
16
web/app/mu-plugins/bedrock-autoloader.php
Normal file
16
web/app/mu-plugins/bedrock-autoloader.php
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Plugin Name: Bedrock Autoloader
|
||||||
|
* Plugin URI: https://github.com/roots/bedrock-autoloader
|
||||||
|
* Description: An autoloader that enables standard plugins to be required just like must-use plugins. The autoloaded plugins are included during mu-plugin loading. An asterisk (*) next to the name of the plugin designates the plugins that have been autoloaded.
|
||||||
|
* Author: Roots
|
||||||
|
* Author URI: https://roots.io/
|
||||||
|
* License: MIT License
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Roots\Bedrock;
|
||||||
|
|
||||||
|
if (is_blog_installed() && class_exists(Autoloader::class)) {
|
||||||
|
new Autoloader();
|
||||||
|
}
|
||||||
0
web/app/plugins/.gitkeep
Normal file
0
web/app/plugins/.gitkeep
Normal file
0
web/app/themes/.gitkeep
Normal file
0
web/app/themes/.gitkeep
Normal file
0
web/app/uploads/.gitkeep
Normal file
0
web/app/uploads/.gitkeep
Normal file
7
web/index.php
Normal file
7
web/index.php
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* WordPress View Bootstrapper
|
||||||
|
*/
|
||||||
|
define('WP_USE_THEMES', true);
|
||||||
|
require __DIR__ . '/wp/wp-blog-header.php';
|
||||||
10
web/wp-config.php
Normal file
10
web/wp-config.php
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Do not edit this file. Edit the config files found in the config/ dir instead.
|
||||||
|
* This file is required in the root directory so WordPress can find it.
|
||||||
|
* WP is hardcoded to look in its own directory or one directory up for wp-config.php.
|
||||||
|
*/
|
||||||
|
require_once dirname(__DIR__) . '/vendor/autoload.php';
|
||||||
|
require_once dirname(__DIR__) . '/config/application.php';
|
||||||
|
require_once ABSPATH . 'wp-settings.php';
|
||||||
3
wp-cli.yml
Normal file
3
wp-cli.yml
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
path: web/wp
|
||||||
|
server:
|
||||||
|
docroot: web
|
||||||
44
wp-config-ddev.php
Normal file
44
wp-config-ddev.php
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* #ddev-generated: Automatically generated WordPress settings file.
|
||||||
|
* ddev manages this file and may delete or overwrite the file unless this comment is removed.
|
||||||
|
*
|
||||||
|
* @package ddevapp
|
||||||
|
*/
|
||||||
|
|
||||||
|
if ( getenv( 'IS_DDEV_PROJECT' ) == 'true' ) {
|
||||||
|
/** The name of the database for WordPress */
|
||||||
|
defined( 'DB_NAME' ) || define( 'DB_NAME', 'db' );
|
||||||
|
|
||||||
|
/** MySQL database username */
|
||||||
|
defined( 'DB_USER' ) || define( 'DB_USER', 'db' );
|
||||||
|
|
||||||
|
/** MySQL database password */
|
||||||
|
defined( 'DB_PASSWORD' ) || define( 'DB_PASSWORD', 'db' );
|
||||||
|
|
||||||
|
/** MySQL hostname */
|
||||||
|
defined( 'DB_HOST' ) || define( 'DB_HOST', 'ddev-my-blog-db' );
|
||||||
|
|
||||||
|
/** WP_HOME URL */
|
||||||
|
defined( 'WP_HOME' ) || define( 'WP_HOME', 'https://my-blog.ddev.site' );
|
||||||
|
|
||||||
|
/** WP_SITEURL location */
|
||||||
|
defined( 'WP_SITEURL' ) || define( 'WP_SITEURL', WP_HOME . '/' );
|
||||||
|
|
||||||
|
/** Enable debug */
|
||||||
|
defined( 'WP_DEBUG' ) || define( 'WP_DEBUG', true );
|
||||||
|
|
||||||
|
/** WordPress environment type. */
|
||||||
|
defined( 'WP_ENVIRONMENT_TYPE' ) || define( 'WP_ENVIRONMENT_TYPE', 'local' );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set WordPress Database Table prefix if not already set.
|
||||||
|
*
|
||||||
|
* @global string $table_prefix
|
||||||
|
*/
|
||||||
|
if ( ! isset( $table_prefix ) || empty( $table_prefix ) ) {
|
||||||
|
// phpcs:disable WordPress.WP.GlobalVariablesOverride.Prohibited
|
||||||
|
$table_prefix = 'wp_';
|
||||||
|
// phpcs:enable
|
||||||
|
}
|
||||||
|
}
|
||||||
44
wp-config.php
Normal file
44
wp-config.php
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* #ddev-generated: Automatically generated WordPress settings file.
|
||||||
|
* ddev manages this file and may delete or overwrite the file unless this comment is removed.
|
||||||
|
* It is recommended that you leave this file alone.
|
||||||
|
*
|
||||||
|
* @package ddevapp
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** Database charset to use in creating database tables. */
|
||||||
|
define( 'DB_CHARSET', 'utf8' );
|
||||||
|
|
||||||
|
/** The database collate type. Don't change this if in doubt. */
|
||||||
|
define( 'DB_COLLATE', '' );
|
||||||
|
|
||||||
|
/** Authentication Unique Keys and Salts. */
|
||||||
|
define( 'AUTH_KEY', 'unLqsGLWtBYJYkfagzybyEKSgYNGJLMbRBRSUnqPUWYwpXZvZemfXwUPFoWzIOpW' );
|
||||||
|
define( 'SECURE_AUTH_KEY', 'fRnJqcOyFpXiHzibAvclySDhWtjaVFIRIypnuDhNiFmDwQhRUmjQvgOrrXAsRUbe' );
|
||||||
|
define( 'LOGGED_IN_KEY', 'acFYfvfStAGmuZNcdnGWEuvqEnxdBrpjeCnrqWBPDVgyDbAApJvUrxeXGotttIqT' );
|
||||||
|
define( 'NONCE_KEY', 'YEmiqkBgQbeBEDhXFOxxQVQeJQVOGvEDdGTSCncFsFEEeKIrohnKxzHkEpLhowou' );
|
||||||
|
define( 'AUTH_SALT', 'AazoanpwobrgdlVmznIoxdJfMVAQRMhFTLTuZnFxoBiTMIHeyPQerLWvOqZUoiqJ' );
|
||||||
|
define( 'SECURE_AUTH_SALT', 'gMtxXOgZYIIdlcOUcMXngWJCUJAqXgqPSpHsrEqCxcPrzKqApChedImwmSYdcIGN' );
|
||||||
|
define( 'LOGGED_IN_SALT', 'KNyedMtSRNXGJBNdSalaJZQAzCgzjZnfYJMwYBrzKyvLkxOTEQqanbhEBuHXXJbK' );
|
||||||
|
define( 'NONCE_SALT', 'LqmFtwfaKEiMbXSrrmBzkeLWFnIvyaaKIFNzAcmdGRJZGBIVJZVrJqSlkBMZLwJb' );
|
||||||
|
|
||||||
|
/* Add any custom values between this line and the "stop editing" line. */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* That's all, stop editing! Happy publishing. */
|
||||||
|
|
||||||
|
/** Absolute path to the WordPress directory. */
|
||||||
|
defined( 'ABSPATH' ) || define( 'ABSPATH', dirname( __FILE__ ) . '/' );
|
||||||
|
|
||||||
|
// Include for settings managed by ddev.
|
||||||
|
$ddev_settings = __DIR__ . '/wp-config-ddev.php';
|
||||||
|
if ( ! defined( 'DB_USER' ) && getenv( 'IS_DDEV_PROJECT' ) == 'true' && is_readable( $ddev_settings ) ) {
|
||||||
|
require_once( $ddev_settings );
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Include wp-settings.php */
|
||||||
|
if ( file_exists( ABSPATH . '/wp-settings.php' ) ) {
|
||||||
|
require_once ABSPATH . '/wp-settings.php';
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user