Skip to content

Instantly share code, notes, and snippets.

@Epigene
Forked from Sacristan/Wordpress_KB.md
Last active May 18, 2016 12:26
Show Gist options
  • Save Epigene/acadbc6db00e99fa9c21a9d38adf4667 to your computer and use it in GitHub Desktop.
Save Epigene/acadbc6db00e99fa9c21a9d38adf4667 to your computer and use it in GitHub Desktop.

#Edit MySQL config:

sudo rvim /etc/mysql/my.cnf

80% RAM to innodb_buffer_pool_size -> https://www.percona.com/blog/2015/06/02/80-ram-tune-innodb_buffer_pool_size/

#XMLRPC issues Search for XMLRPC POST logs

grep xmlrpc.php /var/log/apache2/access.log
  • /var/www/html/.htaccess Add this line to deny access to xmlrpc.php
<Files "xmlrpc.php">
Order Deny,Allow
Deny from all
</Files>

#GET memory usage http://php.net/manual/en/function.memory-get-usage.php

#PHP memory limit http://stackoverflow.com/questions/10738990/ini-set-ini-get-memory-limit-restoring-memory-php

#SET PHP memory limit Wordpress

source: http://ideaboxthemes.com/increase-php-memory-limit-wordpress/

sudo rvim /etc/php5/apache2/php.ini
memory_limit = 128M 
memory_limit = -1 (unlimited)

Dokku WP config optimization

Deny xmlrpc.php via Nginx

Either in nginx.conf.sigil (dokku level) or nginx.conf (app level), add a location block

  location ~* xmlrpc.php {
    return  403;
  }

Change PHP memory_limit

UNSOLVED, SO question @ http://stackoverflow.com/questions/37298727/how-to-change-dokku-php-memory-limit Run heroku-php-nginx with the -i option

# in Procfile
web: vendor/bin/heroku-php-nginx -C nginx.conf -i php_custom.ini
# in php_custom.ini
memory_limit=256M

Increade database memory

Unsolved, question for MariaDB plugin dev @ dokku/dokku-mariadb#52

Useful MySQL docs

innodb_buffer_pool_size=256M

Add PHP newrelic

Unsolved, question for dokku devs @ dokku/dokku#2204

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment