Git plugins within WordPress on WP Engine

I am currently 0 for 2 in finding plugins for managing Git that play nicely with WP Engine.

The plugins I tried were:

  • Revisr
  • VersionPress

Goal

A way to commit and push changes from within the WordPress dashboard to a git based repository

Motivation

WP Engine’s approach for using git works well most of the time.  I don’t track the WP core in my repositories, but I do track plugins.  I do this to track custom developed plugins and bug fixes/enhancements to freely available plugins that never get pushed into their original code base.

The benefit of using managed hosting is that they automatically update plugins if necessary for security fixes.  The bad part is that these updates are only made on the production server and don’t end up in the repository.  Also, from time to time, they will ask you to remove a plugin from their disallowed plugins list.  If it isn’t removed within a week, they will remove the plugin and this change doesn’t end up in the repository either.  Additionally, managing plugin updates through the admin panel requires deleting the local copy, downloading the changes via SFTP, committing, and pushing to the remote.  The desired goal is to cut out these additional steps and commit directly from within the WordPress back-end.

Lastly, I also like knowing when plugins were first installed and especially if someone else requested the functionality.

Revisr

20160811-sot-revisr

Site: https://revisr.io/

WordPress.org: https://wordpress.org/plugins/revisr/

GitHub: https://github.com/ExpandedFronts/revisr

“I made Revisr to simplify the development process,” Matt Shaw the developer told WP Tavern. “There are currently no plugins on WordPress.org that allow developers or site admins to use all of the main features of Git through the WordPress dashboard, and I made Revisr to do just that,” he said.

I installed this plugin first, but wasn’t able to get it running without the installation path to git:

20160811-sot-revisr-git-not-detected

WP Engine doesn’t expose git for security reasons.  0 for 1 so far.

 

VersionPress

20160811-sot-versionpress

https://versionpress.net/

I installed VersionPress and got a notice that it required a newer PHP version on the server.

I admittedly installed this without checking the disallowed plugins list.  I got an email the next day informing that VersionPress is disallowed on WP Engine.

VersionPress — In order to function properly, this plugin needs access to server level functions that we disallow for security purposes. – WP Engine Disallowed Plugins

I am 0 for 2.

A final note

One interesting thing I read, but cannot seem to find again, is that one of these plugins has dropping the installed git requirement on its road map.  If I can find that again or becomes a reality, I’ll update here.

Self Driving Cars in the News

Crashes:

Near misses:

Other incidents:

Notable news:

Ethical issues:

Use the Advanced Custom Fields plugin for stashing code

Anyone working with code in the WordPress TinyMCE WYSIWYG editor will have had their code blown away when switching between “Text” (HTML) and Visual editing modes.

One of the many uses of Advanced Custom Fields plugin is to create a text area to stash code associated with a page or post that the editor can’t touch.

Using: https://www.advancedcustomfields.com/

It’s a similar idea to using the plugin to add custom JavaScript or CSS to a page/post, except the field isn’t exposed in the theme.

This serves to only store the code alongside the post/page in the database.

This will not prevent the editor from modifying the code again in the future if it is pasted back into the editor, but it is a convenient place to copy the code from again.

If you want a more permanent solution you could disable the visual editor, remove the filtering, or other options.

20160811-sot-acf-code-stash

CC: “Python for Informatics” Open Textbook Remixed in 11 Days

Image: dr-chuckCC BY

 

Chuck Severance, clinical professor at the University of Michigan’s School of Information, recently published a new textbook in 11 days because he was able to remix an existing textbook. The book, Python for Informatics: Exploring Information, is currently being used in his winter semester Networked Computing course. The textbook is based on the openly licensed book Think Python: How to Think like a Computer Scientist by Allen B. Downey. Students are able to take advantage of the University Library’s Espresso Book Machine to print on-demand copies for approximately $10. Python for Informatics is available under a CC BY-SA license.

Severance explains, “the book is a cool example of a situation where I’ve finally got to the ‘remixing’ bit of the Open promise.” The first 10 chapters are done and eight more are planned for completion by April 2010. Read more of Chuck’s thoughts about remixing an open book.

Creating this open textbook was a part of a larger effort by Chuck to support his course with openly licensed  content, and current versions of lecture slides and videos are published via the PythonLearn website.  In a past iteration of the course, Chuck went through the dScribe process developed by Open.Michigan to create an OER version of SI 502, available under a CC BY license.

Computing, technology, general information