Skip to content

Commit

Permalink
Rename /web to /public, remove all fix scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
stian-overasen authored Nov 13, 2019
1 parent 20ac10b commit 933fe94
Show file tree
Hide file tree
Showing 11 changed files with 33 additions and 125 deletions.
8 changes: 4 additions & 4 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
DB_NAME=database_name
DB_USER=database_user
DB_PASSWORD=database_password
DB_NAME=local
DB_USER=root
DB_PASSWORD=root

# Optional variables
# DB_HOST=localhost
# DB_PREFIX=wp_

WP_ENV=development
WP_HOME=http://example.com
WP_HOME=http://test.local
WP_SITEURL=${WP_HOME}/wp

# Generate your keys here: https://roots.io/salts.html
Expand Down
10 changes: 5 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@ wp
/composer.lock

# Language files
web/content/languages
public/content/languages

# Plugins
web/content/plugins
public/content/plugins

# Themes
web/content/themes/teft-theme
public/content/themes/teft-theme

# Upgrade and uploads
web/content/upgrade
web/content/uploads
public/content/upgrade
public/content/uploads

# Dotenv
.env
Expand Down
14 changes: 8 additions & 6 deletions INSTALLATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,21 +44,23 @@ Much of the philosophy behind Bedrock is inspired by the [Twelve-Factor App](htt

Or, you can cut and paste from the [Roots WordPress Salt Generator][roots-wp-salt].

3. Add theme(s) in `web/content/themes` as you would for a normal WordPress site.
3. Add theme(s) in `public/content/themes` as you would for a normal WordPress site.

4. Set your site vhost document root to `/path/to/site/web/` (`/path/to/site/current/web/` if using deploys)

5. Access WP admin at `http://example.com/wp/wp-admin`
4. Access WP admin at `http://example.com/wp/wp-admin`

## Local by Flywheel Installation

1. Create a new site in the Local app using Custom settings.

Note that if you use preferred settings, the setup script will fail because preferred does not create the `/conf` folder required by teft-base.

2. `cd` to the `/app/` folder and `rm -r public` to remove the WordPress files automatically generated by Local.
2. `cd` to the site app folder and `rm -rf public` to remove the `/public` folder automatically generated by Local.

3. While in the `/app` folder, clone Teft Base using `git clone [email protected]:DekodeInteraktiv/teft-base.git .`.

4. Restart the site in Local.

3. Follow the normal installation instructions.
5. Follow the normal installation instructions.

## Deploys

Expand Down
25 changes: 9 additions & 16 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,31 +39,24 @@
"dekodeinteraktiv/coding-standards": "^3.0"
},
"extra": {
"wordpress-install-dir": "web/wp",
"wordpress-install-dir": "public/wp",
"installer-paths": {
"web/content/mu-plugins/{$name}/": [ "type:wordpress-muplugin" ],
"web/content/plugins/{$name}/": [ "type:wordpress-plugin" ],
"web/content/themes/{$name}/": [ "type:wordpress-theme" ]
"public/content/mu-plugins/{$name}/": [ "type:wordpress-muplugin" ],
"public/content/plugins/{$name}/": [ "type:wordpress-plugin" ],
"public/content/themes/{$name}/": [ "type:wordpress-theme" ]
},
"dropin-paths": {
"web/content/languages/": [ "vendor:koodimonni-language" ],
"web/content/languages/plugins/": [ "vendor:koodimonni-plugin-language" ]
"public/content/languages/": [ "vendor:koodimonni-language" ],
"public/content/languages/plugins/": [ "vendor:koodimonni-plugin-language" ]
}
},
"scripts": {
"post-install-cmd": [
"rm -rf web/wp/wp-content",
"rm -rf web/wp/composer.json"
"rm -rf public/wp/wp-content",
"rm -rf public/wp/composer.json"
],
"post-root-package-install": [
"php -r \"copy('.env.example', '.env');\"",
"composer local-fix-no-folder-check"
],
"local-fix-no-folder-check": [
"bash post-install-scripts/local-webroot-fix.sh;"
],
"local-fix": [
"bash post-install-scripts/local-webroot-fix.sh --check-folder;"
"cp .env.example .env"
],
"lint": [
"@composer install",
Expand Down
2 changes: 1 addition & 1 deletion config/application.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
$root_dir = dirname( __DIR__ );

// Document Root.
$webroot_dir = $root_dir . '/web';
$webroot_dir = $root_dir . '/public';

/**
* Expose global env() function from oscarotero/env
Expand Down
10 changes: 5 additions & 5 deletions phpcs.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
<config name="testVersion" value="7.0-" />
<rule ref="Dekode" />

<exclude-pattern>web/wp</exclude-pattern>
<exclude-pattern>web/content/languages</exclude-pattern>
<exclude-pattern>web/content/plugins</exclude-pattern>
<exclude-pattern>web/content/uploads</exclude-pattern>
<exclude-pattern>web/content/themes/teft-theme</exclude-pattern>
<exclude-pattern>public/wp</exclude-pattern>
<exclude-pattern>public/content/languages</exclude-pattern>
<exclude-pattern>public/content/plugins</exclude-pattern>
<exclude-pattern>public/content/uploads</exclude-pattern>
<exclude-pattern>public/content/themes/teft-theme</exclude-pattern>
</ruleset>
87 changes: 0 additions & 87 deletions post-install-scripts/local-webroot-fix.sh

This file was deleted.

File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion wp-cli.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
path: web/wp
path: public/wp

0 comments on commit 933fe94

Please sign in to comment.