-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initialize Git repo on wp-content #1
Comments
How do you deploy WordPress updates, though? My workflow has been to include everything under version control and never touch the server manually. Maybe I can include options to control this behavior, or just don't initialize the git repo. I've been debating whether this is the job of the gem. |
Yes, I include everything under version control as well. I deploy using Capistrano and never touch the production server manually. Whenever I can, I try to include "libraries" (WordPress itself, plugins etc.) as git submodules. My directory structure looks something like this:
I think @etienne is right in that this should be left up to the developer, and maybe the Wordless gem should just not bother initialising a git repo at all. It's easy enough for the developer to just |
@emzo: I'm curious about your setup. It look too good to be true. How do you have WordPress itself in a sub-directory of your public directory? I thought the WordPress installation needed to be at the root level of the public directory. Also, it's good that you mention git submodules because I've been debating using that for the Wordless plugin. In fact, in previous versions of the gem I installed the plugin as a submodule, and I later changed that to a plain git repo, after reading things like this. The plain git repo seemed like a much simpler alternative, so I'm curious to hear about the pro's of actual submodules. |
Have a look at https://codex.wordpress.org/Giving_WordPress_Its_Own_Directory
WordPress will automatically look for a As for git submodules, I'm still not 100% sure it's the best way to do things, but it's not as bad as people think. |
I can't believe I didn't know this. Thanks, that's very useful. It dawns on me that many people will want many different ways to set up WordPress and Wordless.
That's a lot of possibilities. I could offer command line options for all of those, but it could easily lead to unsightly commands like this:
One possibility would be to make the gem interactive, wizard-style. It would ask you questions along the way to configure itself the right way. Good for newbies, but sounds like a long-winded process for something that should be quick and simple. Another possibility would be to have some sort of configuration file (e.g. Any thoughts on this? Other suggestions? |
Indeed, the flexibility of WordPress installations is both a blessing and curse! The global config file sounds like a good solution though, I'd go with that personally. As you mention, it could simplify things by hiding many options, but still allows for total flexibility on a per-project basis. I've found this article on Digging into WordPress to be a good resource on configuration options. Some interesting work going on with wp-cli as well. |
Messed up my commit message. This is not actually fixed. |
I think it's a better practice to make a git repo inside the wp-content directory. Wordpress is just a "library" that you can update without changes is the "application" code.
The text was updated successfully, but these errors were encountered: