Comments (5)
For updating WordPress core, you'd point the submodule to a new commit SHA. Like so:
cd wp
git fetch
git fetch --tags
git checkout 3.4
cd ../
git add wp
git commit -m 'Update to WordPress 3.4'
git push
You might even make that a bash script that you can run, like wpup 3.4
For themes, I'd actually recommend that you put them in your repo, as they are sometimes updated outside of a WordPress release. Symlinking to the core ones is a bit of a shortcut just to get you started.
Once in your repo, you could use a local development checkout to have WordPress update the themes. Then just git add --all
the theme directory, git commit -m 'Updating {name} theme'
, and git push
.
from wordpress-skeleton.
Thanks for the quick response, Mark. This is just what I'm needing.
However, you referenced deploying with Capistrano. I'm attempting the same with whiskey_disk. It seems that after running the commands you provided to update WordPress core to a specific tag, you would have to run those same commands on the production server after deploying. For example, after running:
...
git commit -m 'Update to WordPress 3.4'
git push
cap production deploy
It seems you would still have to SSH into the production server and run:
cd wp
git fetch --tags
cd ..
git submodule update
Are you doing this to deploy a WordPress core update to your production server? Is there a way around this? Are you using a post deploy bash script to do this?
from wordpress-skeleton.
I have it built in to my Capistrano scripts. And I'll be releasing that as a separate "sister project" very soon. But here's the git submodule tags code:
# Enable Submodules in Capistrano
set :git_enable_submodules, 1
# Task to update submodule tags
namespace :git do
desc "Updates git submodule tags"
task :submodule_tags do
run "if [ -d #{shared_path}/cached-copy/ ]; then cd #{shared_path}/cached-copy/ && git submodule foreach --recursive git fetch origin --tags; fi"
end
end
# Schedule this task to happen BEFORE deploy
before( "deploy", "git:submodule_tags" )
BOOM, HEADSHOT!
from wordpress-skeleton.
:) Very cool. Thanks again.
from wordpress-skeleton.
Postscript: the "sister project" I mentioned is WP Stack.
from wordpress-skeleton.
Related Issues (20)
- Update to Wordpress 4.4.2
- wp_localize_script doesn't appear to work
- Cannot Access Uploads Directory HOT 2
- Help Starting HOT 2
- Woocommerce template overrides not working
- Differences from _s HOT 1
- Installation failed: Download failed. cURL error 60: SSL certificate problem: self signed certificate in certificate chain HOT 2
- Nginx [no multi site] HOT 3
- Can't Establish php database connection on MAMP HOT 1
- Changing symlinks for media files stored in /shared/ HOT 2
- Broken Customizer After Migration
- '/content' directory not found beside '/wp' directory (get_template_directory_uri) HOT 1
- normalize.css doesn't appear here. Why? HOT 1
- How to change language of site and admin dashboard? HOT 1
- Repeated 403 console error when changing siteurl
- Update WP Skeleton to 4.2 Please HOT 1
- Multisite note HOT 7
- Problem loading theme assets HOT 1
- Question: Multisite, local (XAMPP) install
- MAMP/LAMP Multisite issues with my imported DB
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wordpress-skeleton.