Git beginner: Keeping track of on-server changes

Can i, with Git, checkout the most current repo from my live server to my local machine? No, unless you also add the wp-content folder under version control. You can instead look at other tools, such as rsync. As for the database, you could make the live server accept remote MySQL connections, so that you … Read more

Why do the Roots theme CSS files not load (404)?

I took a risk and activated the theme to see what might happen. Roots needs to complete theme activation to add the rules into .htaccess. Until this happens none of the CSS / JS will load and the theme preview lacks stylesheets. It turns the stock .htaccess: # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase … Read more

Add latest commit info on login footer using login_footer hook

On the command line, I tried to run git log –git-dir=”[dir].git’ -1 –work-tree=”[dir]” and it gave me an error. When I ran git –git-dir=”[dir].git” –work-tree=”[dir]” log -1, it worked as expected. So your code should probably be echo shell_exec( “git –git-dir=”$E4AFZ_PLUGIN_ROOT_DIR.git” –pretty=format:’%h – %s (%ci)’ –abbrev-commit –work-tree=”$E4AFZ_PLUGIN_ROOT_DIR” log -1 ); Also: PHP expands variables inside … Read more

WordPress updates and Git

In my readings (and as mentioned in OP comments) the best practice seemed to be focusing on the /wp-content/ folder, or specific custom contents therein. Syncing all the core files and third party plugins just causes headaches and unnecessary version monitoring. I had troubles with this myself, but it’s best to remove the mentality that … Read more

WordPress with Git deployment issues

I commit all WordPress because I consider it one big ball of code that pertains to one site, this means updates to core WordPress files, plugins and themes are all part of the commit history. I don’t use sub-modules or any other weird nested revision setups. If you have a complicated structure of including multiple … Read more

Do i need the git directory?

You should not need the .git directory but I would not delete it. It contains the version control for your site, and is thus an incredibly valuable resource should you need a developer to fix or upgrade your site in the future. It also shows you a full history of the development of your site. … Read more

Workflow for working with git and WordPress

The problem with the linked article in your question is that it is suggesting to download WordPress and then create your own git repo – but then this cannot be easily updated. Instead you can have WordPress itself in git. Rather than the default subversion, there is an offical Github repository of WordPress, and in … Read more

Pull latest stable release via git [closed]

To my knowledge it is not possible to generically clone/checkout the latest stable version with either git or svn. In either case you have to identify the specific tag (version) you want to pull from with git or svn. Or, as you’ve done, just pull trunk (which is the development branch) For more see: https://codex.wordpress.org/Using_Subversion

WordPress and Git Workflow

I’m one of the developers of WP Migrate DB Pro, and would like to answer @Ennui’s question: “Do you know if the db url replace script it runs takes into account serialized strings?” Yes, it does handle serialized data. In fact, that is the primary reason I developed the free version of the plugin back … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)