This tool automates the creation of new WordPress sites with ED. Digital's default plugins and theme. It's really only meant for ED. developers, but anyone is free to use it.
Prerequisits and assumptions:
coolsite.devor something. You can achieve this manually by editing your
/etc/hostsfile... This is not covered by this guide or tool.
To install, open Terminal and type:
npm install -g edwp
This will add a new command for you to run at any time, the
ed command. Note that this will overwrite the 'ed' editor which ships with Mac OS and some Linux distributions.
Now setup your local web server. If you're using MAMP you'll need to configure a couple of things first.
Next, you'll want to create a configuration for your local machine. Make sure MySQL is already running, as it'll attempt to connect.
Follow the prompts to fill in the configuration file. You'll need to fill in the user section with the user your created in PHPMyAdmin.
And you're good to go!
To create a new site, do something like the following:
cd ~/Sites/ ed create coolsite.dev
After answering each question carefully, the tool will begin downloading the required resources and creating your site. It may take a little time. At the end of the process, if successful, you'll be shown the URL, username and password for accessing your site.
Don't forget to create a new site in MAMP that points to the new folder!
Alternatively, if you're using XAMPP, add
127.0.0.1 coolsite.dev to
/etc/hosts and in
/Applications/XAMPP/xamppfiles/etc/extra/httpd-vhosts.conf add the following lines.
<VirtualHost *:80> ServerName coolsite.dev DocumentRoot "/path/to/site/" <Directory "/path/to/site/"> Options Indexes FollowSymLinks Includes ExecCGI AllowOverride All Require all granted </Directory> ErrorLog "logs/coolsite.dev-error_log" </VirtualHost>
You may still need to make some configuration changes to your new site after logging in:
Once a site has been created, you can jump to that projects theme folder from anywhere, by typing
ed go <project-slug>
For sites that were created manually, you can import them using:
cd <path-to-site> ed scan
It'll ask you for a project name, and then you're all sorted ;) All it does is create an entry in
Clone this project to your local machine and if you've installed node-edtool from npm, uninstall it now.
npm uninstall -g ed-wp
Make your changes locally then test by running:
npm install npm link