Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
7 changes: 3 additions & 4 deletions bin/gitpress_utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,13 @@ function installWP {
--admin_email="${WORDPRESS_EMAIL:-test@test.com}" \
--allow-root

wp plugin install /usr/src/versionpress/*.zip --activate --allow-root

wp vp activate --allow-root
}

function restoreWP {
info "Restoring WP"
unzip /usr/src/versionpress/versionpress-4.0-beta2.zip -d wp-content/plugins/
wp vp restore-site --siteurl="${WORDPRESS_URL:-http://localhost}" --require=wp-content/plugins/versionpress/src/Cli/vp.php --yes --allow-root
info "Restoring WP"
wp vp restore-site --siteurl="${WORDPRESS_URL:-http://localhost}" --require=wp-content/mu-plugins/versionpress/src/Cli/vp.php --yes --allow-root
}

function getGitEndpoint {
Expand Down
10 changes: 10 additions & 0 deletions mu-plugins/versionpress/.htaccess
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Apache 2.2
<IfModule !mod_authz_core.c>
Order Deny,Allow
Deny from all
</IfModule>

# Apache 2.4
<IfModule mod_authz_core.c>
Require all denied
</IfModule>
198 changes: 198 additions & 0 deletions mu-plugins/versionpress/.versionpress/actions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,198 @@
post:
tags:
VP-Post-Title: post_title
VP-Post-Type: post_type
VP-Post-Format: /
actions:
create: Created %VP-Post-Format% '%VP-Post-Title%'
trash: %VP-Post-Format% '%VP-Post-Title%' moved to trash
untrash: %VP-Post-Format% '%VP-Post-Title%' moved from trash
delete: Deleted %VP-Post-Format% '%VP-Post-Title%'
draft: Created draft for %VP-Post-Format% '%VP-Post-Title%'
publish: Published %VP-Post-Format% '%VP-Post-Title%'
update:
message: Updated %VP-Post-Format% '%VP-Post-Title%'
priority: 12

user:
tags:
VP-User-Login: user_login
actions:
create: Created user '%VP-User-Login%'
update:
message: Updated user '%VP-User-Login%'
priority: 12
delete: Deleted user '%VP-User-Login%'

option:
actions:
create: Created option '%VPID%'
update:
message: Updated option '%VPID%'
priority: 12
delete: Deleted option '%VPID%'

comment:
tags:
VP-Comment-PostTitle: /
VP-Comment-Author: comment_author
actions:
create: New comment for post '%VP-Comment-PostTitle%'
update:
message: Updated comment for post '%VP-Comment-PostTitle%'
priority: 12
delete: Deleted comment for post '%VP-Comment-PostTitle%
trash: Comment for post '%VP-Comment-PostTitle%' moved to trash
untrash: Comment for post '%VP-Comment-PostTitle%' moved from trash
approve: Approved comment for post '%VP-Comment-PostTitle%'
unapprove: Unapproved comment for post '%VP-Comment-PostTitle%'
spam: Comment for post '%VP-Comment-PostTitle%' marked as spam
unspam: Comment for post '%VP-Comment-PostTitle%' marked as not spam
create-pending: New comment for post '%VP-Comment-PostTitle%' (pending approval)

term:
tags:
VP-Term-Name: name
VP-Term-OldName: /
VP-Term-Taxonomy: /
actions:
create:
message: New %VP-Term-Taxonomy% '%VP-Term-Name%'
priority: 9
delete: Deleted %VP-Term-Taxonomy% '%VP-Term-Name%'
rename: %VP-Term-Taxonomy% '%VP-Term-OldName%' renamed to '%VP-Term-Name%'
update:
message: Updated %VP-Term-Taxonomy% '%VP-Term-Name%'
priority: 12

term_taxonomy:
tags:
VP-TermTaxonomy-Taxonomy: taxonomy
VP-Term-Name: /
VP-Term-Id: vp_term_id
actions:
create: New %VP-TermTaxonomy-Taxonomy% '%VP-Term-Name%'
update:
message: Updated %VP-TermTaxonomy-Taxonomy% '%VP-Term-Name%'
priority: 12
delete: Deleted %VP-TermTaxonomy-Taxonomy% '%VP-Term-Name%'

commentmeta:
tags:
VP-Comment-Id: vp_comment_id
VP-CommentMeta-Key: meta_key
parent-id-tag: VP-Comment-Id
actions:
create:
message: Created commentmeta '%VP-CommentMeta-Key%'
priority: 15
update:
message: Updated commentmeta '%VP-CommentMeta-Key%'
priority: 17
delete:
message: Deleted commentmeta '%VP-CommentMeta-Key%'
priority: 15

usermeta:
tags:
VP-User-Id: vp_user_id
VP-UserMeta-Key: meta_key
VP-User-Login: /
parent-id-tag: VP-User-Id
actions:
create:
message: Created usermeta '%VP-UserMeta-Key%'
priority: 15
update:
message: Updated usermeta '%VP-UserMeta-Key%'
priority: 17
delete:
message: Deleted usermeta '%VP-UserMeta-Key%'
priority: 15

termmeta:
tags:
VP-Term-Id: vp_term_id
VP-TermMeta-Key: meta_key
parent-id-tag: VP-Term-Id
actions:
create:
message: Created termmeta '%VP-TermMeta-Key%'
priority: 15
update:
message: Updated termmeta '%VP-TermMeta-Key%'
priority: 17
delete:
message: Deleted termmeta '%VP-TermMeta-Key%'
priority: 15

postmeta:
tags:
VP-Post-Id: vp_post_id
VP-PostMeta-Key: meta_key
VP-Post-Type: /
VP-Post-Title: /
parent-id-tag: VP-Post-Id
actions:
create:
message: Created postmeta '%VP-PostMeta-Key%' for %VP-Post-Type% '%VP-Post-Title%'
priority: 15
update:
message: Updated postmeta '%VP-PostMeta-Key%' for %VP-Post-Type% '%VP-Post-Title%'
priority: 17
delete:
message: Deleted postmeta '%VP-PostMeta-Key%' for %VP-Post-Type% '%VP-Post-Title%'
priority: 15

composer:
actions:
install: Installed Composer package '%VPID%'
update: Updated Composer package '%VPID%'
delete: Deleted Composer package '%VPID%'

plugin:
tags:
VP-Plugin-Name: /
actions:
install: Installed plugin '%VP-Plugin-Name%'
activate: Activated plugin '%VP-Plugin-Name%'
deactivate: Deactivated plugin '%VP-Plugin-Name%'
update: Updated plugin '%VP-Plugin-Name%' # Updating the plugin itself
edit: Edited plugin '%VP-Plugin-Name%' # Editing plugin files
delete: Deleted plugin '%VP-Plugin-Name%'

theme:
tags:
VP-Theme-Name: /
actions:
install: Installed theme '%VP-Theme-Name%'
update: Updated theme '%VP-Theme-Name%' # Updating the theme itself
edit: Edited theme '%VP-Theme-Name%' # Editing theme files
switch: Theme switched to '%VP-Theme-Name%'
delete: Deleted theme '%VP-Theme-Name%'

wordpress:
actions:
update: WordPress updated to version %VPID%

translation:
tags:
VP-Language-Code: /
VP-Language-Name: /
VP-Translation-Type: /
VP-Translation-Name: /
actions:
activate:
message: Site language switched to '%VP-Language-Name%'
priority: 9
install: Installed translation '%VP-Language-Name%'
update: Updated translation '%VP-Language-Name%'
uninstall: Uninstalled translation '%VP-Language-Name%'

versionpress:
actions:
activate: Activated VersionPress %VPID%
update: Updated to VersionPress %VPID%
deactivate: Deactivated VersionPress
undo: Reverted change "%/commit-message/%"
rollback: Rollback to the same state as of %/commit-date/%
Loading