markjaquith / wp-stack Goto Github PK
View Code? Open in Web Editor NEWA toolkit for creating professional WordPress deployments
A toolkit for creating professional WordPress deployments
It'd be nice if the wp-stack-cdn plugin could detect SSL. When I specify WP_STACK_CDN_DOMAIN, 'https://cdn.zippykid.com'); The final string turns out to be http://https://cdn.zippykid.com, if I don't specify the scheme, it forces http..
Not sure what the best way to do this is, maybe a third option WP_STACK_CDN_SSL, true, which forces the filter to use ssl?
When deploying with this the permissions of the deployment path are set group writable which on cpanel systems causes huge issues, is there anyway to correct this after deployment automatically?
Hi Mark,
I try to install Capistrano and WP-Stack to use them for my WP Multisite deployment process.
There are some things I'm not sure to understand.
1- Why do we need to create a new user "deploy"?
2- In the doc. (Setup > 5. ) you wrote ...
Switch to the deploy user (su deploy) and check out WP Stack somewhere on your server: git clone [email protected]:markjaquith/WP-Stack.git ~/deploy
To be able to clone your repo. from Github on my PC, you have to accept my public key no? So I can't run your command above.
To clone your repo, I must enter this command instead
git clone git://github.com/markjaquith/WP-Stack.git
3- In the doc. (Setup > 7. ) you wrote ...
Make sure your :deploy_to path exists and is owned by the deploy user: chown -R deploy:deploy /path/to/your/deployment
Does it mean I must create the "deploy" user to my remote server before to run the command chown -R deploy:deploy /path/to/your/deployment ?
I am wrong? There is something I didn't understand?
upload_method
method has a var_dump in it followed by a die
Assuming you've already set up something like:
Hey @markjaquith, what's the impact of WP 3.5 with regard to the new multisite filesystem options? I'm eager to take advantage of the new way of doing things in 3.5, any chance this code will se an update soon to accomodate it?
In a case where you're defining a background url or other similar CSS case with the URL defined inside of a parenthesis, the regex misses these URLs. Example:
background: url('wp-content/themes/pax/img/icon-link-btn.png') no-repeat !important;
background: url("http://DOMAIN.COM/wp-content/uploads/2013/01/logo-blue.png") no-repeat scroll center center transparent !important;
Hi,
I'm at a loss .. it looks so simple, but I just can't get the CDN must-use plugin to work.
I've tried it on 2 of my sites, both running WP 3.9.1. I've created the wp-content/mu-plugins/ directory and dropped the plugin into there.
I've created the CloudFront CDNs, one using a CNAME, the other just using the cloudfront domain, I've also defined the constant in the wp-config.php file -- but, nothing happens?!
One site has W3TC installed (not using the CDN option from there, obviously), the other has no caching. However, when I browse the site, neither has URLs re-written to point the CDN?
I've confirmed that the CDN is working, I can view content using the cloudfront url, and in wp-config.php I have:
define ('WP_STACK_CDN_DOMAIN', 'xxxxxxxxxxxx.cloudfront.net');
Can you offer any help to get this working?
Thanks in advance.
Just checking if I'm reading the code correctly, the DB sync changes only the site url and home url in the database, and doesn't delve into post content / post meta at all?
When using the CDN drop-in, all of the images using <img src="" />
seem to work properly with the URL getting replaced. On CSS Background Images though the URLs don't seem to be getting replaced.
Example - http://phoenix.prontomarketing.com/
The big background banner image is not using the CDN.
Is this by design because most of the time CSS backgrounds use relative paths? It wouldnt get the CDN domain in that case either I suppose.
Thanks,
Alex
Hi Guys!
I went through a situation here that made me lose a few minutes.
The CDN plugin do a preg_replace on the entire rendered page to replace the old urls with the new ones.
The problem was when I had more than one URL to be replaced on the same line. The preg_replace did just one replacement, the first.
So, for example:
<a href="http://url.com/wp-content/uploads/2014/01/img.png"><img src="http://url.com/wp-content/uploads/2014/01/img.png"></a>
would be replaced with
<a href="http://cdn.com/wp-content/uploads/2014/01/img.png"><img src="http://url.com/wp-content/uploads/2014/01/img.png"></a>
Note that the href attribute for the a tag was replaced, but not the src for the img. Thats because they are on the same line.
Having difficulties with db:sync. Not working for me when I run cap staging db:sync
Outputs :
triggering load callbacks
executing staging' triggering start callbacks for
db:sync'
executing multistage:ensure' executing
db:sync'
Hang on... this might take a while.
db:sync
staging
The system cannot find the path specified.
Database synced to staging
Memcached flushed
Any ideas what I am doing wrong?
I have three production WP sites that i want to manage through the same workflow. Is there a way to call the capistrano job to specify which one, or do I need to create a wp-stack clone for each site?
I've been researching how to implement Capistrano into my wordpress workflow and feel like there is a lot of potential in the WP-stack script templates. Currently its very unclear what files you need to modify and what the effect of modifications are. I would like to write some concrete explanation of what your server/local system structure should be and a step-by-step guide as to how to get WP-Stack up and running.
Apart from the public README, is there any existing documentation I can work off of?
I talked with Robbie for a bit yesterday and I understood a bit of how Knewton structures their servers. Its very helpful to understand the structure in which WP-Stack is most useful. I've attached the flowchart I made.
It is meant to be read from left to right. On the left is your own machine. The "Local" is a virtual server running off Vagrant. The "Repo" is working on Github. The "Admin Box" is the remote controller for managing the "Staging" and "Production" servers.
The Databases themselves are backedup on Vaultpress. Whenever there is local work done, the database is pulled from the remote servers. When changes need to be made to the databases, the processes made locally and replayed on the remote servers.
Are there any plans to update this to use Capistrano 3.x?
Hi,
This isn't an actual issue but I was wondering if there was any workaround to make the deployment process faster ?
I didn't get myself much into Capistrano just yet but I will. Unless one of you guys have a solution I might try to find one.
One solution I have in mind is that currently we pull the full repository ( I think ) so this is quite slow, especially with big WordPress installations. We might be able to copy a cached version and apply a diff instead ? Do you think that might be possible ? Would that be bad practice or risky ?
Thanks,
Reading this project I don't find the README file easy to follow.
Would it be possible for someone for the owner to run over this and write clearer documentation?
My scenario is that I'd like to setup so that I can deploy to dev/stage/production servers from my local MBP.
I have WP Skelton, I've installed Capistrano but the installation of Stack isn't clear for me.
Any update would be much appreciated.
Thanks for your hard work on this.
The Multisite Uploads plugin should inject an .htaccess rule to handle the rewritten uploads URLs in Apache environments.
Many sites feed MailChimp or similar via the RSS feed.
Protocol relative URLs to images break many email clients, including Gmail and Outlook.
To fix this I changed the main filter to:
return preg_replace( "#=([\"'])(https?:)(//{$this->site_domain})?/([^/](?:(?!\\1).)+)\.(" . implode( '|', $this->extensions ) . ")(\?((?:(?!\\1).)+))?\\1#", '=$1$2//' . $this->cdn_domain . '/$4.$5$6$1', $content );
This could be an option, or it could just be the default until relative protocol URLs are more broadly supported.
Hey,
First, this is not really an issue (as in an issue with WP-Stack) but mostly just a question on how to properly use it.
So, we have a server running Plesk Panel. We are hosting multiple clients on it. Each client has it's own domain in the vhosts directory. All directories that are in the vhosts directory can be accessed by the deploy user, and are owned by root. However, once in, let's say, example.com, the deploy user does not have the right to access the httpdocs folder. This is normal as the httpdocs folder is owned by the Plesk FTP user for example.com. I imagine this is why step 7 says to recursively chown
the :deploy_to
path. Doing so would probably cause a bunch of problems with Plesk. However, this could be done, and we run a custom task to reset the permission after deploying. But wouldn't we have to do this permissions dance every time we wanted to deploy (because we reset permissions after each deploy) ?
Could we instead make the deploy user, or it's group, namely deploy, have the right to access all folders, much like root. Or is this a big security concern ? We are trying to avoid having to manage SSH keys for each FTP user. Also, FTP user (which can have SSH access) do not have the privileges to run the sudo chown
command found at line 7 of 'tasks.rb' - and we don't want to give every user sudo privileges.
Not sure if this all makes sense...
Thanks!
Hi, this is a question more than a bug, but does anyone have a cap task to run with db:sync for changing my /etc/hosts to spoof my domains? So that when I'm doing local development, mysite.com points to 127.0.0.1, but when I'm not, it resolves to the production IP? Thanks for any help you can offer--I googled around for this but I probably wasn't phrasing it right.
Best regards,
David Ham
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.