Skip to content
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
6 changes: 3 additions & 3 deletions deployment/lib/server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@
desc "Fix permissions"
task :permissions do
# Avoid uploading problems if Apache owns directories
run "find #{remote_web} -follow -type d -exec chown :www-data {} \\;"
sudo "find -L #{remote_web} -type d -exec chown :www-data {} \\;"

# Both deploy & Apache have 1st control of directories
run "find #{remote_web} -follow -type d -exec chmod 775 {} \\;"
sudo "find -L #{remote_web} -type d -exec chmod 775 {} \\; -exec chmod g+s {} \\;"

# Files should not be executable, but deploy + Apache still have control
run "find #{remote_web} -follow -type f -exec chmod 644 {} \\;"
sudo "find -L #{remote_web} -type f -exec chmod 664 {} \\;"
end

namespace :logs do
Expand Down
4 changes: 2 additions & 2 deletions generator/app/templates/web/wp-config.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
.replace(/(\/\*\*#@\+(?:.|[\r\n])+?\*\/[\r\n]+)(?:.|[\r\n])+?([\r\n]+\/\*\*#@-\*\/)/m, '$1__GENERATED_SALTS_PLACEHOLDER__$2')
.split('__GENERATED_SALTS_PLACEHOLDER__').join(props.salts)

// Limit to 5 post revisions
.replace("/* That's all,", "define('WP_POST_REVISIONS', 5);\n\n/*That's all,")
// Limit to 5 post revisions, and force direct filesystem IO
.replace("/* That's all,", "define('WP_POST_REVISIONS', 5);\n\ndefine('FS_METHOD', 'direct');\n\n/*That's all,")
%>
if (WP_ENV !== 'www') {
Genesis::rewriteUrls();
Expand Down
4 changes: 4 additions & 0 deletions provisioning/roles/common/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@
when: has_vagrant.stdout
sudo: yes

- name: Add www-data user to deploy
user: name=www-data append=yes groups=deploy
sudo: yes

- name: Calculate PHP memory_limit
command: echo "{{ 256 if ansible_memtotal_mb > 2048 else 128 }}"
register: calc_php_memory_limit
Expand Down