Skip to content

Commit 26aa1bd

Browse files
committed
Merge branch 'release/v0.1.2'
2 parents 66b3def + 865f659 commit 26aa1bd

File tree

5 files changed

+46
-20
lines changed

5 files changed

+46
-20
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ node_modules
2727
# config/uploads
2828

2929
# prod files
30-
prod.*
30+
# prod.*
3131

3232
# cache
3333
# content/cache

README.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ Core files, plugins, and all. The best (and cleanest) way to do this is to sit y
8080
.gitignore
8181
Capfile
8282
dev.config.php
83+
prod.config.php
8384
Gemfile
8485
Gemfile.lock
8586
index.php
@@ -91,15 +92,17 @@ Your uploads directory should be git ignored as you don't want to version contro
9192

9293
Great, now you're almost ready for rendering your WordPress website.
9394

94-
First we need a database. Create or clone your local database and configure your `dev.config.php` with your settings.
95+
First we need a database. Create or clone your local database, then copy `dev.config.php` to `config.php` and edit with your settings.
9596

96-
`dev.config.php` will be only used on your local environment and won't we deploy to your server folder. We already mentioned that inside the `.gitignore` file for you :sunglasses:
97+
`dev.config.php` and `prod.config.php` are only guidelines for you to create your `config.php` files on all your environment. Make sure to remove these 2 files before committing to your Git repository.
98+
99+
`config.php` should only be used on your local environment and you should have another `config.php` with your server configuration inside your `linked_files` folder, but that is better explained in the `Server side` section of this file. For now just make sure not to deploy your `config.php` file. We already mentioned that inside the `.gitignore` file for you :sunglasses:
97100

98101
Inside `wp-config.php` we already set some constants to a default value like `DB_CHARSET`, `DB_COLLATE` and `WPLANG`. Feel free to edit this file with your custom settings.
99102
In the same file, there is a section called `Custom Directory`, here we tell WordPress our new file structure.
100-
We also try to include a `config.php`. This will contain your server database configuration and will be stored inside your server `shared` folder from where Capistrano will create a symlink inside your project folder so you don't need to do it manually.
103+
We also need to require the `config.php`. This will contain your environment database configuration. On your server side, this will be stored inside your server `shared` folder from where Capistrano will be able to create a symbolic link inside your project folder so you don't need to do it manually.
101104

102-
Now, if you have correctly configured your database and your `dev.config.php` you should be able to run your local environment using some PHP and MySQL tool like MAMP.
105+
Now, if you have correctly configured your database and your `config.php` you should be able to run your local environment using some PHP and MySQL tool like MAMP.
103106

104107
#### Be careful
105108

@@ -154,6 +157,11 @@ The code and the documentation are released under the [MIT License](http://sonny
154157

155158
## Changelog
156159

160+
### 0.1.2
161+
* config.php strategy changed to only use a config.php on all the environment instead of dev and prod.config.php
162+
* Documentation updated<br>
163+
2016.03.05
164+
157165
### 0.1.1
158166
* License and repository URL updated<br>
159167
2016.02.21

dev.config.php

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,20 @@
2222
define('LOGGED_IN_SALT', 'put your unique phrase here');
2323
define('NONCE_SALT', 'put your unique phrase here');
2424

25-
define( 'WP_DEBUG_DISPLAY', true );
25+
// Display PHP errors
26+
@ini_set( 'display_errors', true );
27+
// Store all the errors inside the default server error.log if no `error_log` defined
28+
@ini_set( 'log_errors', true );
29+
// Define where you want to store the error log file on your server side
30+
@ini_set( 'error_reporting', E_ALL );
31+
@ini_set('error_log', dirname(__FILE__) . '/php-errors.log');
32+
// Turns WordPress debugging on
2633
define( 'WP_DEBUG', true );
27-
define('WP_DEBUG_LOG', false);
28-
@ini_set( 'display_errors', E_ALL );
34+
// Display errors on screen
35+
define( 'WP_DEBUG_DISPLAY', true );
36+
// Tells WordPress not to log everything to the /wp-content/debug.log
37+
define( 'WP_DEBUG_LOG', false );
38+
// Disable the editing of theme and plugin files
39+
// define( 'DISALLOW_FILE_EDIT', true );
40+
// Disable installing new themes and plugins, and updating them
41+
// define( 'DISALLOW_FILE_MODS', true );

prod.config.php

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,20 @@
2222
define('LOGGED_IN_SALT', 'put your unique phrase here');
2323
define('NONCE_SALT', 'put your unique phrase here');
2424

25-
define('WP_DEBUG', false);
26-
define('WP_DEBUG_DISPLAY', false);
27-
define('WP_DEBUG_LOG', true);
25+
// Hides errors from being displayed on-screen
26+
@ini_set( 'display_errors', false );
27+
// Store all the errors inside the default server error.log if no `error_log` defined
2828
@ini_set( 'log_errors', true );
29-
@ini_set('display_errors', false);
29+
// Define where you want to store the error log file on your server side
30+
// @ini_set( 'error_reporting', E_ALL );
31+
// @ini_set('error_log', dirname(__FILE__) . '/php-errors.log');
32+
// Turns WordPress debugging off
33+
define( 'WP_DEBUG', false );
34+
// Don't display errors on screen
35+
define( 'WP_DEBUG_DISPLAY', false );
36+
// Tells WordPress not to log everything to the /wp-content/debug.log
37+
define( 'WP_DEBUG_LOG', false );
38+
// Disable the editing of theme and plugin files
39+
// define( 'DISALLOW_FILE_EDIT', true );
40+
// Disable installing new themes and plugins, and updating them
41+
// define( 'DISALLOW_FILE_MODS', true );

wp-config.php

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,7 @@
22
// ===================================================
33
// Load database info and local development parameters
44
// ===================================================
5-
if ( file_exists( dirname( __FILE__ ) . '/config.php' ) ) {
6-
// if we are on a live environment, use config.php
7-
include( dirname( __FILE__ ) . '/config.php' );
8-
}
9-
else {
10-
// otherwise, on a development environment, use the dev.config.php
11-
include( dirname( __FILE__ ) . '/dev.config.php' );
12-
}
5+
require( dirname( __FILE__ ) . '/config.php' );
136

147
define( 'DB_CHARSET', 'utf8' );
158
define( 'DB_COLLATE', '' );

0 commit comments

Comments
 (0)