Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #581 - Use WP-CLI to run WP cron #583

Merged
merged 1 commit into from
Jul 28, 2016
Merged
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
### HEAD
* Fix #581 - Use WP-CLI to run WP cron ([#583](https://github.com/roots/trellis/pull/583))
* Require explicit redirects and drop www_redirect ([#622](https://github.com/roots/trellis/pull/622))
* Fix #612 - Bump nginx_fastcgi_buffer_size to `8k` ([#620](https://github.com/roots/trellis/pull/620))
* Setup permalink structure for multisite installs too ([#617](https://github.com/roots/trellis/pull/617))
Expand Down
2 changes: 1 addition & 1 deletion roles/wordpress-setup/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
name: "{{ item.key }} WordPress cron"
minute: "*/15"
user: "{{ web_user }}"
job: "curl -k -s {{ site_env.wp_siteurl }}/wp-cron.php > /dev/null 2>&1"
job: "cd {{ www_root }}/{{ item.key }}/{{ item.value.current_path | default('current') }} && wp cron event run --due-now"
cron_file: "wordpress-{{ item.key | replace('.', '_') }}"
with_dict: "{{ wordpress_sites }}"
when: site_env.disable_wp_cron and not item.value.multisite.enabled | default(false)
2 changes: 1 addition & 1 deletion roles/wp-cli/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
wp_cli_version: 0.23.1
wp_cli_version: 0.24.0
wp_cli_bin_path: /usr/bin/wp
wp_cli_phar_url: "https://github.com/wp-cli/wp-cli/releases/download/v{{ wp_cli_version }}/wp-cli-{{ wp_cli_version }}.phar"
wp_cli_completion_url: "https://raw.githubusercontent.com/wp-cli/wp-cli/v{{ wp_cli_version }}/utils/wp-completion.bash"
Expand Down
1 change: 1 addition & 0 deletions roles/wp-cli/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
get_url:
url: "{{ wp_cli_phar_url }}"
dest: "{{ wp_cli_bin_path }}"
force: true
mode: 0755

- name: Retrieve WP-CLI tab completions
Expand Down