Version control with a team of non-developers

You can try using Source Tree https://www.sourcetreeapp.com/, no need to learn heavily the command line git, all the non coders need to do is copy their files to your repo, then commit and push if there are no complications that will arise. The only bad side of this is if there will be merge issues …

Read more

How to get the SQL of the changes made to the database from an update or upgrade?

Log queries: You could collect all the queries during core/plugin/theme upgrades to see what happens. Just follow these two steps: 1) You should add: define( ‘SAVEQUERIES’, TRUE ); to your wp-config.php file to collect all queries during a page load into the $wpdb->queries array. Just remember to remove it afterwards. 2) Then you could log …

Read more

How should I be handling my theme version numbering?

It is good practise to use semantic versioning e.g. 1.0.1 MAJOR.MINOR.PATCH MAJOR version when you make incompatible changes, MINOR version when you add functionality in a backwards-compatible manner, and PATCH version when you make backwards-compatible bug fixes. Don’t update the version on every code commit in git (just do it manually), rather on every group …

Read more

When I try to install VersionPress, it tells me, “The package could not be installed. No valid plugins were found.”

It looks like the file you downloaded, versionpress-master.zip, isn’t structured like a WordPress plugin. When I unzip versionpress-master.zip, the plugin looks like it’s in the directory plugins/versionpress. You’ll need to copy that directory and all its contents to your site’s plugin directory (usually wp-content/plugins). Edited to add: The official site’s installation instructions indicate that you …

Read more

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