Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/robdwaller/wordpress-salts-generator
A key and salts generator for WordPress that works with both wp-config and .env files.
https://github.com/robdwaller/wordpress-salts-generator
cli composer composer-package keys salts wordpress
Last synced: 2 months ago
JSON representation
A key and salts generator for WordPress that works with both wp-config and .env files.
- Host: GitHub
- URL: https://github.com/robdwaller/wordpress-salts-generator
- Owner: RobDWaller
- License: mit
- Created: 2018-04-03T13:09:27.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2020-05-09T20:57:04.000Z (over 4 years ago)
- Last Synced: 2024-10-17T08:51:18.365Z (3 months ago)
- Topics: cli, composer, composer-package, keys, salts, wordpress
- Language: PHP
- Homepage:
- Size: 28.3 KB
- Stars: 8
- Watchers: 2
- Forks: 7
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# WordPress Salts Generator
A key and salts generator for WordPress that works with both wp-config and .env files.
- This library is for use with a composer setup of WordPress.
- Keys and salts are generated via the command line.## Installation
To install this library either use the composer require command.
```
composer require rbdwllr/wordpress-salts-generator 0.1.*
```Or add it straight to your `composer.json` file and run `composer update`.
```
require: {
"rbdwllr/wordpress-salts-generator": "0.1.*"
}
```## Commands
Their are two simple commands available for generating the keys and salts.
```
// Generates traditional WordPress 'define' keys and salts.
vendor/bin/wpsalts traditional// Generates keys and salts that can be used in a .env file.
vendor/bin/wpsalts dotenv
```If you don't add a command the `vendor/bin/wpsalts` command it will output the traditional WordPress salts and keys.
### Append to File
If you would like to append the keys directly to the end of an .env file you can use the `--clean` flag as follows.
```
vendor/bin/wpsalts dotenv --clean >> .env
```The clean flag removes any messaging and formatting around the output, and the `>>` operator appends the output to the end of the .env file on a new line.
## Output Examples
### Traditional WordPress
```
Copy and paste these keys and salts into your wp-config.php file.define('AUTH_KEY', 'dva\uhm"cDc<$U5E> )euWbqHRC)|o(sB)9G-n4O2VJ;!');
define('LOGGED_IN_KEY', 'kOq )c"=0>E} c;?PwD;lt0(N9N>%,#OS"]3>,!@[&]]i>G90ucaBxz2\hh]}I@Z');
define('NONCE_KEY', 't>ZZepdu/(8>4|3k5covc7R'":*rhyY>{eZjK4HB:@i5l/d8XTTc(P.v(H|Q/mg4');
define('AUTH_SALT', '{B>CWa$zjM+KN(,(-4yD(pFfdeF 07mPp1xOMkL bDm!X>}p){~(J4\~-AO+0-ZV');
define('SECURE_AUTH_SALT', 'lr'_2T^{O/ODwU:tw8&nU^Ci}_[`ItiWK]e|n t=4?$.s3?yo9KJk8Lv-Dn O6,ZCE>aFh-5KaXbBzV9#^t9rJuTgt'
NONCE_KEY = 'bdt.I)jh6Nz/e,|S-QepePTSd@93E$vk%oX1yd"A,DNExX+v&;>2>^Ni$G%l&YC9'
AUTH_SALT = '$81GB@i@ 0qW@~<yxQ )Q56PyJ6ukOnH]@_:}x-/BAm-Io]=CyJU^T(|7%'
SECURE_AUTH_SALT = '/k4O1L)q@7wJ^~;b`"U6X9s,~7iRAc8v-ypMOM|X.yN=0"gVh|x~$V +Mw(eZ33T'
LOGGED_IN_SALT = '_o_jpvW#iq}l-'Kc&vU}Tht\w,-:462z8=;!x3 =1NyD&[>k^EAZjm(F#=X+T(G''
NONCE_SALT = '.e1j7;9aWlqoBRdLEe?Vh9{m8V7: