This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### /usr/local/psa/admin/conf/templates/custom/domain/nginxDomainVirtualHost.php ### | |
# Source: https://www.websavers.org/how-to-speed-up-wordpress/ | |
rewrite !\.(js|ico|gif|jpg|png|css|pdf|mov|mp3|eot|svg|ttf|woff|otf|txt|swf)$ /index.php break; | |
rewrite /wp-admin/$ /wp-admin/index.php break; | |
rewrite /$ /index.php break; | |
# enable gzip compression | |
gzip on; | |
gzip_min_length 1100; | |
gzip_buffers 4 32k; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
define( 'WP_AUTO_UPDATE_CORE', true ); | |
define( 'WP_AUTO_UPDATE_PLUGIN', true ); | |
define( 'WP_AUTO_UPDATE_TRANSLATION', true ); | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
define('DB_NAME', ''); | |
define('DB_USER', ''); | |
define('DB_PASSWORD', ''); | |
define('DB_HOST', 'localhost'); | |
define('DB_CHARSET', 'utf8'); | |
define('DB_COLLATE', ''); | |
define('WP_DEBUG', true); | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* local-settings.php is gitignored so you can put local config in it see - https://gist.github.com/guillaumemolter/2d746cda246ae018bd8a */ | |
if(file_exists(ABSPATH . 'local-settings.php')){ | |
require_once(ABSPATH . 'local-settings.php'); | |
} | |
else{ | |
die(ABSPATH . "local-settings.php is missing, please read the repo's readme.md"); | |
} | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: Postmarkapp Email Integrator | |
Plugin URI: https://wordpress.org/plugins/postmarkapp-email-integrator/ | |
Description: Overwrites wp_mail to send emails through Postmark. This plugin is a bug fixed edition of the official Postmarkapp plugin | |
Author: Gagan Deep Singh | |
Version: 2.1 | |
Author URI: https://gagan.pro | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* The base configurations of the WordPress. | |
* | |
* This file has the following configurations: MySQL settings, Table Prefix, | |
* Secret Keys, and ABSPATH. You can find more information by visiting | |
* {@link https://codex.wordpress.org/Editing_wp-config.php Editing wp-config.php} | |
* Codex page. You can get the MySQL settings from your web host. | |
* | |
* This file is used by the wp-config.php creation script during the |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function remove_wp_endpoints($default_routes){ | |
$new_routes["/"] = $default_routes["/"]; | |
return $new_routes; | |
} | |
add_filter('json_endpoints', 'remove_wp_endpoints', 20, 3); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
remove_action( 'rest_api_init', 'create_initial_rest_routes', 0 ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#Update this with your own path. Mine is in dropbox because I use Tom McFarlin's trick to sync https://tommcfarlin.com/sharing-visual-studio-code-settings/ | |
CODE_PREFS_PATH='/Users/guillaumemolter/Dropbox/Apps/Code/User/extensions.conf' | |
EXTENSIONS=`cat $CODE_PREFS_PATH` | |
for EXTENSION in ${EXTENSIONS[@]} | |
do | |
code --install-extension $EXTENSION | |
done | |
# then add to your .bash_profile : |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Network wide search and replace | |
wp search-replace 'NEEDLE' 'HAYSTACK' --network --verbose | |
# Network wide search and replace for domain (ie: prod to dev DB migration) | |
wp search-replace 'old.domain.com' 'new.domain.com' --network --verbose --url=old.domain.com | |
# Network wide rewrite rules and permalinks flush | |
wp site list --field=url | xargs -n1 -I % wp rewrite flush --url=% |
OlderNewer