Skip to content

Instantly share code, notes, and snippets.

View pkiula's full-sized avatar

Phoenix Hunter pkiula

  • UK
View GitHub Profile
@CydeSwype
CydeSwype / sftp_on_php_and_MAMP.txt
Last active March 18, 2023 21:06
Install SSH2 for PHP 7.1 on MAMP (to support SFTP read/write via file_put_contents, etc.)
// add the repo that has all the PHP goodness
brew tap Homebrew/homebrew-php
// install the ssh2 library
brew install php71-ssh2
// verify you've got ssh2 loaded - should return something like:
// Additional .ini files parsed => /usr/local/etc/php/7.1/conf.d/ext-ssh2.ini
// Registered PHP Streams => https, ftps, compress.zlib, compress.bzip2, php, file, glob, data, http, ftp, phar, zip, ssh2.shell, ssh2.exec, ssh2.tunnel, ssh2.scp, ssh2.sftp
// ssh2
@Adirael
Adirael / fix-wordpress-permissions.sh
Created August 17, 2012 23:16
Fix wordpress file permissions
#!/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