This file contains hidden or 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 | |
/** | |
* Display the last visited non-PMPro page in the confirmation message, OR | |
* redirect the member back to the last visited page. | |
* | |
* Usage Guide: | |
* | |
* 1. Set your preference to either display the link or redirect back to | |
* the referrer page by setting the $toggle_display_redirect variable | |
* to true or false. |
This file contains hidden or 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
## Update and Upgrade Repos | |
sudo su | |
sudo apt update -y && sudo apt upgrade -y && sudo apt dist-upgrade -y && sudo apt autoremove -y | |
## Setup SWAP | |
sudo /bin/dd if=/dev/zero of=/var/swap.1 bs=1M count=1024 | |
sudo /sbin/mkswap /var/swap.1 | |
sudo /sbin/swapon /var/swap.1 | |
sudo sh -c 'echo "/var/swap.1 swap swap defaults 0 0 " >> /etc/fstab' |
This file contains hidden or 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
sudo su | |
//Setup Hostname | |
hostnamectl set-hostname subdomain.domain.tld | |
## Basic | |
sudo apt-get update && sudo apt-get -y upgrade && sudo apt-get autoremove -y && sudo apt-get install software-properties-common | |
sudo add-apt-repository ppa:ondrej/php -y && add-apt-repository ppa:nginx/stable -y | |
//Setup SWAP | |
sudo fallocate -l 1G /swapfile; |
This file contains hidden or 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 | |
// There's also a standalone version, no Visual Composer required, purely as a shortcode here https://gist.github.com/Jany-M/d3014a7039c884a8bbd8e8271cfcd982 | |
if( class_exists( 'WPBakeryShortCode' ) && !class_exists( 'vcMUloop' ) ) { | |
class vcMUloop extends WPBakeryShortCode { | |
function __construct() { | |
add_action( 'init', array( $this, 'vc_multisite_mapping' ) ); |