flurinduerst / wpdistillery Goto Github PK
View Code? Open in Web Editor NEWWordPress Setup runner for Scotch Box
License: Other
WordPress Setup runner for Scotch Box
License: Other
Here is what I do, using Ubuntu 16.04:
$ mkdir WP-test
$ cd WP-test/
$ git clone https://github.com/flurinduerst/WPDistillery.git && mv WPDistillery/Vagrantfile Vagrantfile && mv WPDistillery/wpdistillery wpdistillery2 && rm -rf WPDistillery && mv wpdistillery2 wpdistillery
Change wpdistillery.dev to wpdistillery.test in ~/WP-test/wpdistillery/config.yml and ~/WP-test/Vagrantfile to avoid this issue: https://superuser.com/questions/919278/err-icann-name-collision-when-trying-to-use-localhost-dev-in-chrome
$ cd wpdistillery/
$ vagrant up --debug;
go to http://wpdistillery.test/ and get this page:
I get the following error when running the default configuration of WP Distillery:
_The box 'scotch/box' could not be found or
could not be accessed in the remote catalog. If this is a private
box on HashiCorp's Atlas, please verify you're logged in via
vagrant login
. Also, please double-check the name. The expanded
URL and error message are shown below:
URL: ["https://atlas.hashicorp.com/scotch/box"]
Error:_
I am running version 1.8.7 of vagrant.
I was not sure weather to open the issue here or on the Scotch Box repo.
Hello,
I've performed the following to receive the error:
vagrant ssh
bash setup.sh
(WordPress 4.6 then installs)vagrant@scotchbox:/var/www$ bash setup.sh
========== WPDISTILLERY START ==========
[=== INSTALL WORDPRESS ===]
»»» downloading WordPress...
Downloading WordPress 4.6 (en_US)...
Using cached file '/home/vagrant/.wp-cli/cache/core/wordpress-4.6-en_US.tar.gz'...
Success: WordPress downloaded.
»»» creating wp-config...
Success: Generated wp-config.php file.
»»» installing wordpress...
PHP Fatal error: Call to undefined function apply_filters() in /var/www/public/wp-includes/load.php on line 317
Do you want to continue anyway? (y/n) y
»»» continuing WPDistillery setup...
»»» configure settings...
» timezone:
PHP Fatal error: Call to undefined function apply_filters() in /var/www/public/wp-includes/load.php on line 317
Do you want to continue anyway? (y/n)
»»» aborting WPDistillery setup!
Could this be due to WordPress 4.6?
Kind regards,
sumnermic
The config.yml
file contains a syntax error. Both NetBeans 8.1 and yamllint.com report the same error:
(<unknown>): mapping values are not allowed in this context at line 56 column 19
This is probably due to the fact that the line is indented. Removing indentation causes the parser to continue and to find another error:
(<unknown>): mapping values are not allowed in this context at line 107 column 12
Cause of this error, and the errors on the 3 lines following it, are the same as the first one. I understand that the indentation is probably there to group related values; however, in YAML, indentation has syntactic significance. Besides not displaying correctly in editors with syntax highlighting, I imagine this also makes standards-compliant parsers unable to parse the configuration.
The setup file assumes your theme download ends with "-master.zip". This is not working as intended.
I'm running Vagrant 1.9.1 on Windows 10 and trying to start the box, everything goes well until the script tries to delete the currently active theme and gives this error:
==> default: Deleted 'twentyfifteen' theme.
==> default: Success: Deleted 1 of 1 themes.
==> default: Deleted 'twentysixteen' theme.
==> default: Success: Deleted 1 of 1 themes.
==> default: Warning: Can't delete the currently active theme: twentyseventeen
==> default: Error: No themes deleted.
==> default: »»» aborting WPDistillery setup!
After setup, .htaccess
is not generated, preventing permalinks from working.
Consider using wp rewrite flush
with --hard
to generate the .htaccess
file as part of WP provisioning.
How about a preset Wordmove file that will get filled with additional data from config.yml?
see https://innovativethought.net/2007/07/25/making-configuration-files-with-yaml/
maybe include another ruby file to stay isolated between scotch and ScWPSetup
double check with scotch.io devs -> maybe adding a check into the vagrantfile by default?
Not directly WPDistillery related - apologies if this might not be the proper place - but I thought to ask here if someone else has a similar request: Due to the fact that I'd like to start a project with Foundation I wanted to combine Bedrock and WPDistillery. I had a look if someone else did this already - with no luck.
Any hints and/or suggestions for a good starting point?
The most important feature to me would be the improved directory structure (besides usage of Foundation 6).
Creating this issue in case someone runs into this error caused by NOT upgrading wp cli to 0.24.0 with sudo wp cli update --allow-root
wp core install returns:
PHP Fatal error: Class 'WP_Widget' not found in /var/www/wp-includes/widgets/class-wp-widget-pages.php on line 17 Fatal error: Class 'WP_Widget' not found in /var/www/wp-includes/widgets/class-wp-widget-pages.php on line 17
Installation aborts with this notification repeating multiple times:
==> default: PHP Warning: mkdir(): Permission denied in phar:///usr/local/bin/wp/php/WP_CLI/FileCache.php on line 265
==> default: Warning: mkdir(): Permission denied in phar:///usr/local/bin/wp/php/WP_CLI/FileCache.php on line 265
and then at the end
==> default: Warning: The package could not be installed. "No valid plugins were found."
==> default: Plugin install failed.
==> default: Error: No plugins installed.
==> default:
==> default: »»» aborting WPDistillery setup!
==> default: bash: line 5: xit: command not found
It looks like they downgraded WP CLI in the newest scotchbox so the update command now fails causing nothing to work.
asking the user to continue or abort after an error occurred.
Hi I am up to the command vagrant up and its displaying this error - default: [vagrant-hostsupdater] This operation requires administrative access. You may skip it by manually adding equivalent entries to the hosts file.
?
Installed WPDistillery in a fresh directory following all instructions posted. Observed a few issues during set up:
»»» installing wordpress...
/home/vagrant/.rbenv/versions/2.2.2/lib/ruby/2.2.0/net/smtp.rb:541:in `initialize': Connection refused - connect(2) for "127.0.0.1" port 1025 (Errno::ECONNREFUSED)
from /home/vagrant/.rbenv/versions/2.2.2/lib/ruby/2.2.0/net/smtp.rb:541:in `open'
from /home/vagrant/.rbenv/versions/2.2.2/lib/ruby/2.2.0/net/smtp.rb:541:in `tcp_socket'
from /home/vagrant/.rbenv/versions/2.2.2/lib/ruby/2.2.0/net/smtp.rb:551:in `block in do_start'
from /home/vagrant/.rbenv/versions/2.2.2/lib/ruby/2.2.0/timeout.rb:89:in `block in timeout'
from /home/vagrant/.rbenv/versions/2.2.2/lib/ruby/2.2.0/timeout.rb:99:in `call'
from /home/vagrant/.rbenv/versions/2.2.2/lib/ruby/2.2.0/timeout.rb:99:in `timeout'
from /home/vagrant/.rbenv/versions/2.2.2/lib/ruby/2.2.0/net/smtp.rb:550:in `do_start'
from /home/vagrant/.rbenv/versions/2.2.2/lib/ruby/2.2.0/net/smtp.rb:520:in `start'
from /home/vagrant/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/mail-2.6.3/lib/mail/network/delivery_methods/smtp.rb:112:in `deliver!'
from /home/vagrant/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/mail-2.6.3/lib/mail/message.rb:2141:in `do_delivery'
from /home/vagrant/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/mail-2.6.3/lib/mail/message.rb:238:in `deliver'
from /home/vagrant/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/mailcatcher-0.6.1/bin/catchmail:71:in `<top (required)>'
from /home/vagrant/.rbenv/versions/2.2.2/bin/catchmail:23:in `load'
from /home/vagrant/.rbenv/versions/2.2.2/bin/catchmail:23:in `<main>'
Success: WordPress installed successfully.
Success: Updated user 1.
»»» installing/activating WPSeed...
mv: cannot stat ‘wp-content/themes/WPSeed-master’: No such file or directory
Do you want to continue anyway? (y/n) y
»»» continuing WPDistillery setup...
No other error messages detected.
When attempting to load wpdistillery.dev, received the following Google error: ERR_CONNECTION_TIMED_OUT
As a feature request, it would be great to be able to import all our default ACF field groups and fields on install. We can download/export a json file that can be imported into a new WordPress install, or php to add to functions.php with the same data. It would be awesome to define this in the config and then import all of that from a git repo with the json data.
https://www.advancedcustomfields.com/resources/register-fields-via-php/
This would have to be after the plugin installs of course, but would make the whole process even better. Thanks!
Let me know your pro/cons on this:
To provide a better overview and have a folder instead of two files in the www-root, put all files into a wpdistillery folder while also splitting up the config.yml into multiple files.
wpdistillery/
|-- .gitignore
|-- CHANGELOG.md
|-- README.md
|-- LICENSE.txt
|-- setup.sh
|-- config/
|-- installation.yml
|-- plugins.yml
|-- settings.yml
|-- setup.yml
|-- theme.yml
alternatively
wpdistillery/
|-- .gitignore
|-- CHANGELOG.md
|-- README.md
|-- LICENSE.txt
|-- setup.sh
|-- config.yml
When replacing step 5 for Windows users, need to add bash setup.sh
after dos2unix setup.sh
Just tried the install with Scotch Box Pro. In Vagrantfile I changed to config.vm.box = "scotch/box-pro"
and startet the installation. It seems that it works.
Do you have another recommendation?
Tnx.
I have been following the instructions on the SCOTCH BOX 2.5 website.
Where I'm running into trouble is setting up WPDistillery via my Windows command prompt.
I typed the following line:
git clone [email protected]:flurinduerst/WPDistillery.git
and I receive the following message:
Cloning into 'WPDistillery'...
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Any thoughts as to what is happening and how it can be corrected?
Hi this is not really an issue.
But letting people know if you want to upgrade to php 7 and mysql 5.6 this is the script I use after vagrant ssh
sudo apt-get update &&
sudo add-apt-repository ppa:ondrej/php &&
sudo apt-get install php7.0 &&
sudo apt-get update &&
sudo apt-get install php7.0-mysql libapache2-mod-php7.0 &&
sudo a2dismod php5 &&
sudo a2enmod php7.0 &&
sudo apt-get update &&
sudo apt-get upgrade &&
sudo apt-get install mysql-server-5.6 &&
sudo apachectl restart
Hi.
There is no way to install xdebug because the Ondrej repository is not reachable.
Error: W: Failed to fetch http://ppa.launchpad.net/ondrej/php5-5.6/ubuntu/dists/trusty/main/binary-amd64/Packages 404 Not Found
Regards,
With #45 we have a pull-request for a multisite feature within WPDistillery. Many thanks to @pjohanneson for the contribution.
WPDistillery aims to be as clean and minimal as possible. It should have everything we really need, but nothing more. Adding the WP-Multisite feature to WPDistillery means, that we add a bunch of options and some code that is only relevant if you're creating a multisite installation. If this feature is used a lot, I'm happy to add it to WPDistillery within the next major release. If not, we might find a solution to add the multisite feature using an optional external source or swap all multisite-relevant files into its own folder.
Please add your answer to this form, so we'll get some insights about the need of this feature.
https://goo.gl/forms/TsDxBINXydOVJ3XJ3
Feel free to add comments, ideas, thoughts in this issue.
Hi I am running a window 8.1 machine.
I am getting this error on step 4. cd ../../var/www/ && bash setup.sh
setup.sh: line 9: $'\r': command not found
setup.sh: line 12: syntax error near unexpected token $'{\r'' 'etup.sh: line 12:
function continue_error {
add option to also create zsh-aliases for the project.
Clarify that wpsettings_url
needs the URL of the development environment, not the staging/production URL.
One of the plugins I'm installing with WPDistillery requires ionCube Loader.
The first time I got an error during bash setup.sh
, I added the appropriate loader via vagrant provision.
However, despite the fact ioncube loader is now present, and apache is restarted at the end of vagrant provisioning, I still get this error...
will be changed in the next release
Hi I have setup my box and just wondering if I change the name of the public folder would this crash the box? Or where would change all references to the 'public' folder without having to run through the setup all over again?
add options like wp option update timezone_string Europe/London
see http://codex.wordpress.org/Option_Reference
Show installed/current version when executing setup.sh.
Prompt to continue with deprecated version
First of all, thanks @flurinduerst for featuring my name in the release notes for 2.2.0; I'm glad I could help.
Now to the point. I understand that this is not really an issue with WPDistillery, but I would like to point out that a fresh install does not allow usage of SimplePie, or anything that relies on libxml
. It's simply not installed in the box. The fix is outlined in scotch-io/scotch-box#311 (comment). However, perhaps you would like to add this to the provisioning routine, because it's kinda necessary to make some popular features of WordPress work.
Try this:
# https://github.com/oerdnj/deb.sury.org/issues/56
sudo LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php
# https://github.com/scotch-io/scotch-box/issues/275
sudo rm /etc/apt/sources.list.d/ondrej-php5-5_6-trusty.list
# Update sources
sudo apt-get update
# Install extra packages
sudo apt-get install -y \
php-curl \
php7.0-xml \
php7.0-mbstring
# Restart server the Ubuntu way
sudo apache2ctl restart
This is from a script that I wrote which would convert ScotchBox 2 to PHP 7, and it used to work very well.
Another thing is that I didn't find the timezone in the php.ini
config. This is required in PHP 7, and I'm not sure how, but everything seems to be working without it for now. Just in case it doesn't one day work, you can use this to add the timezone during provisioning (also from the same script):
sudo sed -i 's/^;\(date\.timezone\) =\s*$/\1 = "Europe\/Paris"/g' /etc/php/7.0/cli/php.ini
sudo sed -i 's/^;\(date\.timezone\) =\s*$/\1 = "Europe\/Paris"/g' /etc/php/7.0/apache2/php.ini
Vagrant fails each time with this error. I am not clear of the cause.
Hi there,
I was testing out wpdistillery, and used the default settings. Now all my local sites are trying to redirect to wpdistillery.dev.
I have looked in my hosts file, but there is no entry for 192.168.33.10 wpdistillery.dev ?
How could I resolve this problem?
Edit
This has essentially broken all my local sites. If I try to access 192.168.33.10 it tries and redirects me to wpdistillery.dev. On some of my local sites, if I enter the full path, I manage to get to the page. ie. 192.168.33.10/path-to-file.
I have looked at my vhosts, host file and a few other places, but can't seem to figure out why this is happening. Are there any other places where wpdistillery changes/writes to that I may have overlooked?
Thanks for any help.
Running WP 4.7.1 and Jetpack 4.5 on latest version of WPDistillery. When I open the Jetpack settings on my localhost, I receive the following error:
Warning: stripos() expects parameter 1 to be string, array given in /var/www/public/wp-includes/formatting.php on line 3774
Using stock Twentysixteen theme. All plugins deleted except for Jetpack.
Confirmed on two separate installs of WPDistillery.
Can anyone else replicate this error?
add a custom file for managing only plugins after the initial WordPress installation
On the initial setup, if page_on_front: true
the front_page title is not set.
In my config.yml
, I changed wpfolder
to wp
. During provisioning, I get the following output:
==> default: * Restarting web server apache2
==> default: AH00112: Warning: DocumentRoot [/var/www/public] does not exist
==> default: AH00112: Warning: DocumentRoot [/var/www/public] does not exist
Maybe, the value public
is hard-coded somewhere?
Getting 404 when going to http://wpdistillery.dev
. Vagrantfile and wpsettings:url:
left untouched.
Hi there,
Having these errors this morning...everything was working fine yesterday..
"An action 'up' was attempted on the machine 'default',
but another process is already executing an action on the machine.
Vagrant locks each machine for access by only one process at a time.
Please wait until the other Vagrant process finishes modifying this
machine, then try again.
If you believe this message is in error, please check the process
listing for any "ruby" or "vagrant" processes and kill them. Then
try again."
Please help! Thanks
switch user config to array to allow creating multiple users (with different roles)
It would be nice if we can add a multi site option to the configuration file / setup to quickly get the multisite feature up and running.
It would be great to have more control over which version of wordpress is being installed.
If you're a moron like me...
I tried to run dos2unix install.sh a few times before realizing it's setup.sh...
fix --autoload parameter needs a value
this is not breaking anything but needs an update on my part.
If the setup fails because of some wrong db configuration, than fix this and try to run the script again it fails because some folder already exist.
Wrong db configuration:
==> default: Error: Datenbank konnte nicht ausgewählt werden. Wir konnten die Verbindung zum Datenbank-Server herstellen (was bedeutet, dass Benutzername und Passwort in Ordnung sind), aber wir konnten die
distillery Datenbank nicht auswählen.
Retry after fixing the config:
==> default: Error: WordPress files seem to already be present here.
In my opinion this shouldn't fail, it should log the state and continue.
The documentation contains no mention of what to do if it is desired to activate one of the default themes. I imagine that one would have to set setup > cleanup > themes
to false
. However, after that - I don't know.
Is there a way to automatically add define( 'WP_DEBUG', true );
and define( 'WP_DEBUG_LOG', true );
to wp-config.php file?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.