Git Product home page Git Product logo

wp-stub's Introduction

WP Stub!

Boilerplate code used to kick-start WordPress projects.

This repo will eventually contain an updated version of my Bueller repo/workflow.


Installation

Automated

Using cURL and tar on a unix system:

# Create your WordPress site folder:
$ mkdir my-wordpress-site && cd my-wordpress-site
# Grab the relevant folders/files from this repo:
$ curl -#L https://github.com/mhulse/wp-stub/tarball/master | tar -xzv --strip-components 1 --exclude=*/{.git*,.editor*,README.*,LICENSE}
# Grab and setup the latest WordPress:
$ wget http://wordpress.org/latest.tar.gz && tar xfz latest.tar.gz && rm -f latest.tar.gz && mv wordpress wp
# Setup fresh database:
$ mysql -u username -p 

At the mysql prompt (replace {...} with valid strings):

mysql> CREATE DATABASE {DBNAME};
mysql> GRANT USAGE ON *.* TO {USER}@localhost IDENTIFIED BY '{PASSWORD}';
mysql> GRANT SELECT, INSERT, UPDATE, DELETE, ALTER, CREATE, DROP, INDEX, EXECUTE ON {DBNAME}.* TO {USER}@localhost;
mysql> exit

mysql prompt tips

In case you want separate user for each database you need to create a new user to access that database. Once created, run all other commands with this username.

mysql> create user {USER}@localhost identified by '{PASSWORD}';

You can test whether your database creation was successful by running this command:

mysql> USE {DBNAME};

Next, open wp-config.php and edit (replace {...} with valid strings):

define('DB_NAME', '{DBNAME}');
define('DB_USER', '{USER}');
define('DB_PASSWORD', '{PASSWORD}');

Replace the below lines with the output of this page.

define('AUTH_KEY',         '');
define('SECURE_AUTH_KEY',  '');
define('LOGGED_IN_KEY',    '');
define('NONCE_KEY',        '');
define('AUTH_SALT',        '');
define('SECURE_AUTH_SALT', '');
define('LOGGED_IN_SALT',   '');
define('NONCE_SALT',       '');

Save and close the file.

A this point, you may need to change file/folder permissions:

find ./ -type d -exec chmod 755 {} \;
find ./ -type f -exec chmod 644 {} \;

Things like your uploads/ and plugins/ directories may need to have looser permissions. You’ll just have to test and find out what works best for your server.

Visit /wp url and install WP …

Virtual hosts:

<VirtualHost *:80>
	DocumentRoot "/Users/xxx/wordpress"
	ServerName wp.local
	ServerAlias www.wp.local
	ErrorLog "logs/wp.local-error.log"
	CustomLog "logs/wp.local-access.log" combined
	#DirectoryIndex index.html
	<Directory "/Users/xxx/wordpress">
		IndexOptions +FancyIndexing NameWidth=*
		Options -Indexes +Includes +FollowSymLinks +MultiViews
		AllowOverride All
		Order allow,deny
		Allow from all
	</Directory>
</VirtualHost>

More information coming soon.

Manually:

  • Coming soon.

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.