Skip to content

Instantly share code, notes, and snippets.

View fromthestone's full-sized avatar
🇮🇹
contributing from remote on free time

Matteo D. fromthestone

🇮🇹
contributing from remote on free time
View GitHub Profile
@fromthestone
fromthestone / php-pools.md
Created March 4, 2019 09:16 — forked from holmberd/php-pools.md
Adjusting child processes for PHP-FPM (Nginx)

Adjusting child processes for PHP-FPM (Nginx)

When setting these options consider the following:

  • How long is your average request?
  • What is the maximum number of simultaneous visitors the site(s) get?
  • How much memory on average does each child process consume?

Determine if the max_children limit has been reached.

  • sudo grep max_children /var/log/php?.?-fpm.log.1 /var/log/php?.?-fpm.log
@fromthestone
fromthestone / .htaccess
Created August 7, 2014 07:14
Redirect a WP installation that is hosted in a subdirectory without losing the chance to keep your WP files into another subfolder
#Use this .htaccess if your WP is hosted in a subdirectory and not in the ROOT of the webserver.
#install this file in yourwp directory and not in the ROOT
#Change your_dir with the right name
#We assume that you installed WP into a subdirectory called yourwpinstallation and you want show the website www.wpwebsi.te/yourwp/
#for Example www.wpwebsi.te/yourwp/yourwpinstallation => RewriteRule . yourwp/index.php [L]
# BEGIN WordPress
<IfModule mod_rewrite.c>
<?php
/*
Plugin Name: Disable plugins when doing local dev
Description: If the WP_LOCAL_DEV constant is true, disables plugins that you specify
Version: 0.1
License: GPL version 2 or any later version
Author: Mark Jaquith
Author URI: http://coveredwebservices.com/
*/