- create a new redis .conf file
$ cp /etc/redis.conf /etc/redis-xxx.conf
- edit /etc/redis-xxx.conf, illustrated as below
...
<?php | |
/* | |
* Dependent Plugin Activation/Deactivation | |
* | |
* Sources: | |
* 1. https://pippinsplugins.com/checking-dependent-plugin-active/ | |
* 2. http://10up.com/blog/2012/wordpress-plug-in-self-deactivation/ | |
* | |
*/ | |
$ cp /etc/redis.conf /etc/redis-xxx.conf
...
<?php | |
// Create the stream context | |
$context = stream_context_create(array( | |
'http' => array( | |
'timeout' => 3 // Timeout in seconds | |
) | |
)); | |
// Fetch the URL's contents |
$fileName = 'Billing-Summary.csv'; | |
header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); | |
header('Content-Description: File Transfer'); | |
header("Content-type: text/csv"); | |
header("Content-Disposition: attachment; filename={$fileName}"); | |
header("Expires: 0"); | |
header("Pragma: public"); | |
$fh = @fopen( 'php://output', 'w' ); |
/** | |
* This function will connect wp_mail to your authenticated | |
* SMTP server. This improves reliability of wp_mail, and | |
* avoids many potential problems. | |
* | |
* Author: Chad Butler | |
* Author URI: http://butlerblog.com | |
* | |
* For more information and instructions, see: | |
* http://b.utler.co/Y3 |
<?php | |
/* | |
* dl-file.php | |
* | |
* Protect uploaded files with login. | |
* | |
* @link http://wordpress.stackexchange.com/questions/37144/protect-wordpress-uploads-if-user-is-not-logged-in | |
* | |
* @author hakre <http://hakre.wordpress.com/> | |
* @license GPL-3.0+ |
#!/bin/bash | |
# | |
# This script configures WordPress file permissions based on recommendations | |
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions | |
# | |
# Author: Michael Conigliaro <mike [at] conigliaro [dot] org> | |
# | |
WP_OWNER=www-data # <-- wordpress owner | |
WP_GROUP=www-data # <-- wordpress group | |
WP_ROOT=$1 # <-- wordpress root directory |
<?php | |
# RegEx For Eval Removal: \s+(eval\(base64.*?\))\); | |
exit; | |
function back_to_for_slash($str) { | |
return str_replace('\\', '/', $str); | |
} | |
$current_dir = back_to_for_slash(dirname(__FILE__) . '/public_html'); | |
$directory = $current_dir; |