Coder Social home page Coder Social logo

wp-reconfigure.sh's Introduction

MOVED THIS THING TO BITBUCKET

wp-reconfigure.sh

A rebuild of the python wp-reconfigure but in bash so that I can more easily throw options/flags at it, etc.

Roadmap:

  • v1.0: a weeks' worth of testing without bugs

wp-reconfigure.sh's People

Contributors

scooterx3 avatar

Watchers

James Cloos avatar  avatar

wp-reconfigure.sh's Issues

Change new DB users to keep the back-half instead of front-half

Currently they are truncated and I add a 'prefix_' to where perhaps 'username' becomes 'prefix_usern' - but many times, usernames are similar enough elsewhere to make it so that if I handle several configurations, I wind up trying to assign the same single user to a bunch of databases. Changing it to make it do 'prefix_rname' instead.

Add a 'quiet' mode

Thinking perhaps about nixing the 'verbose' mode and changing it to 'debug' perhaps (different issue). Want to leave the main verbosity phrases set to display as default. Then create a 'quiet' mode so that with -q it just spits out ONLY the main line that I'm interested in.

Detect & eliminate default values

In wp-config.php, there are some default values:

define('DB_NAME', 'database_name_here');
define('DB_USER', 'username_here');
define('DB_PASSWORD', 'password_here');

Instead of reusing them, if present, I'd like to make that trigger a random name/user/pass generation.

Add a 'debug' mode

Still thinking about it.

The idea would be to remove verbose mode then make a debug mode so in case something isn't behaving properly, it's easy to throw '-d' on the end of it to spit out extra stuff that doesn't necessarily have to do with the normal output. Variable values, etc.

Handle commented blocks

If I run into a commented block, as of yet I've no idea whether lines within the block are commented or not.

Wanting to implement a check to grep for each of those items (DB_NAME, etc) and if the count for any of them is not 1, quit running the script with an error. That way I don't go creating bogus database names.

empty fields cause problems

A test case revealed that leaving the wp_host empty caused problems. It mixed the order of the credentials that were then provided as db, user, pass.

Decide on verbosity

Just wanting cleaner output overall, but pondering adjusting how the -v works. Maybe I'll do a -d for debug mode and move some of the -v to it. Have to review.

Random string generator as a function

It was suggested to make my random string generation into a function, then call it when I need it. So as to avoid unnecessarily running it if I don't actually wind up using it.

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.