NON standard dirty SET of custom modifications to optimize baseline load times on WordPress sites with WooCommerce
- Disable weird cart sessions init on API calls ( maybe_init_cart_session )
[Note] Recovering after a crash using tc.log | |
[ERROR] Can't init tc log | |
[ERROR] Aborting | |
FIX: | |
rm /var/lib/mysql/tc.log | |
Then: | |
sudo service mysql start |
(function(window) { | |
'use strict'; | |
function define_library() { | |
var Core = {}; | |
var Modal = { | |
closeButton: null, | |
modal: null, | |
overlay: null, | |
defaults: { |
(function (window) { | |
"use strict"; | |
function define_library() { | |
var Core = {}; | |
var Modal = { closeButton: null, modal: null, overlay: null, defaults: { className: "fade-and-drop", closeButton: true, content: "", width: "600px", height: "480px", overlay: true } }; | |
var Form = { clickEvents: [] }; | |
var Profiler = {}; | |
var config = { devmode: false, debug: false }; | |
Profiler.startTime = function () { | |
this._startTime = performance.now(); |
<?php | |
/********* DO NOT COPY THE PARTS ABOVE THIS LINE *********/ | |
/* Change size for Yoast SEO OpenGraph image for all content | |
* Credit: Yoast Development team | |
* Last Tested: May 24 2019 using Yoast SEO 11.2.1 on WordPress 5.2.1 | |
*/ | |
add_filter( 'wpseo_opengraph_image_size', 'yoast_seo_opengraph_change_image_size' ); | |
function yoast_seo_opengraph_change_image_size( $string ) { |
// wd-faq/assets/js/faq-main.js | |
jQuery(document).ready(function(){ | |
setTimeout(() => init(), 0); | |
}); | |
function initFaq(){ | |
console.log('Faq booted'); | |
} |
{ | |
"calculator_type": "weight", | |
"dimension": { | |
"pricing": { | |
"enabled": "no", | |
"label": "", | |
"unit": "cm", | |
"calculator": { | |
"enabled": "no" | |
}, |
# Deps | |
sed -i "s|# deb-src|deb-src|" /etc/apt/sources.list | |
apt update | |
export DEPS=" \ | |
build-essential zlib1g-dev libpcre3-dev unzip uuid-dev \ | |
debhelper po-debconf libexpat-dev libgd-dev libgeoip-dev libhiredis-dev \ | |
libluajit-5.1-dev libmhash-dev libpam0g-dev libperl-dev libssl-dev libxslt1-dev quilt" | |
apt install -y $DEPS | |
# NXG Pagespeed |
IMPORTANT: Read this before implementing one of the configuration files below (for either Varnish 3.x or 4.x+).
USE: Replace the contents of the main Varnish configuration file located in /etc/varnish/default.vcl (root server access required - obviously) with the contents of the configuration you'll use (depending on your Varnish version) from the 2 examples provided below.
IMPORTANT: The following setup assumes a 3 minute (180 sec) cache time. You can safely increase this to 5 mins for less busier sites or drop it to 1 min or even 30s for high traffic sites.
This configuration requires an HTTP Header and a user cookie to identify if a user is logged in a site, in order to bypass caching overall (see how it's done in the Joomla section). If your CMS provides a way to add these 2 requirements, then you can use this configuration to speed up your site or entire server. You can even exclude the domains you don't want to cach
To add a SFTP-only user, you'll need to make sure your SSH config settings are correct, add a new user/group and set permissions for your new user. For step-by-step directions, see below. Omit sudo
if you're logged in as root.
Edit /etc/ssh/sshd_config
and make sure to add the following at the end of the file:
Match group filetransfer
ChrootDirectory %h