wordpress - Which folders to commit when using Github with CMS systems -
probably silly question, cannot find advice on internet far, guys have advice. use git version control , use deploy changes websites server(s). it's easy when use nodejs, bit more complicated when using cms system, opinion.
when use nodejs
when use nodejs it's quite easy have node_modules folder contains external libraries install on deployment. rest(my own files) saved on github , deployed server if changed. not store node_modules folder on github account or send server (node modules installed on server, on deployment). it's pretty easy keep 2 (third-party own files) seperated.
when use wordpress, magento or similar
now gets complicated. because cms systems wordpress have folder structure wp_content/themes/theme_name/, own theme files more or less entangled core structure, instead of separated nodejs. , doesn't seem right commit core files github account or send core files server on every deploy (i prefer install them using composer or something, serverside), because i'll never touch core files, obviously.
so there advice? there better whey handle this? maybe change configuration file path theme folder or something?
the best way move wp-content folder outside of standard installation. tend have folder called "wp" basic wordpress installation in , folder called "wp-content" @ same level content files. can tell wordpress content folder elsewhere following:
define('wp_content_dir', dirname(__file__) . '/content'); that goes wp-content.php can take out of main wordpress install (and add git) , place @ same level folders.
to make things better consider looking @ composer https://getcomposer.org/ , using bring in wordpress core , plugins https://wpackagist.org/ friend here. guide got me started on using composer wordpress , start https://roots.io/using-composer-with-wordpress/ can pull in theme git via composer great when deploy etc... capistrano example can run composer on server :)
Very Helpful. Thanks for such Information
ReplyDeleteWP Support
WP Tech Support