GithubHelp home page GithubHelp logo

romslf / wp-config-generator Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 1.0 43 KB

A simple Wordpress config generator using environment variables.

Shell 100.00%
wordpress wordpress-development config-generator script automation wp-config config bash sh shell

wp-config-generator's Introduction

wp-config-generator

A simple Wordpress config generator using environment variables.

The script will generate a working wp-config.php file to your desired location. It will fill database informations using environments variables while Salts/Keys are generated using openssl random Hex values, like f181b8615a73bb0d39765c135c4....

Requirements

  • Openssl

Usage

sh generate.sh sh generate.sh /path/to/wordpress

The script will need a few environement variables to be able to generate your config file.

  • DB_NAME
  • DB_USER
  • DB_PASS
  • DB_HOST
  • TABLE_PREFIX (Optional. Default: wp_)
  • SALTS_SIZE (Optional. Default/Min: 64)

If you don't set it properly, it will tell you which one is missing.

Notes

  • If no wp-config.php is in the given path then the script will generate a default one with the minimum requirements.
  • If a wp-config.php file is already in the given path then the script will back it up (As wp-config.php.DATE_TIME) and only replace needed definitions.
  • If the given path don't exist, then the config will be created next to the generate.sh file.

Screenshots

Success Fail

wp-config-generator's People

Contributors

romslf avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

bpstr

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.