Installs
- MariaDB (latest stable version)
- PHP 8.3
- Nginx
- Install necessary components to begin this setup
#!/bin/bash | |
# Adapted from https://www.spacerex.co/how-to-automatically-backup-a-mysql-or-mariadb-server-with-mysqldump/ | |
# Backup storage directory | |
backupfolder=/var/backups/db | |
logfile=/var/backups/db-bkp.log | |
# MySQL user | |
user=USER | |
password=PASSWORD |
<?php | |
// Remove gutenberg editor from custom post types | |
function prefix_disable_gutenberg($current_status, $post_type) | |
{ | |
if (in_array($post_type, ['client'])) { | |
return false; | |
} | |
return $current_status; | |
} |
<?php | |
/** | |
* Require Featured Images | |
* | |
* @param $post_id | |
*/ | |
function check_thumbnail($post_id) | |
{ | |
$post_status = get_post_status($post_id); |
curl -s --user 'api:API_KEY' \ | |
https://api.mailgun.net/v3/DOMAIN/messages \ | |
-F from='FROM NAME <FROM EMAIL>' \ | |
-F h:Reply-To='REPLY TO' \ | |
-F subject='SUBJECT LINE' \ | |
-F template='TEMPLATE ID' \ | |
-F o:deliverytime='DELIVERY TIME' \ | |
-F to='RECIPIENT EMAIL' \ | |
-F v:fname='RECIPIENT NAME' |
vivianspencer Vivian Reuel Spencer UK
I hereby claim:
location ~* \.(?:ico|css|js|gif|jpe?g|png)$ { | |
expires 30d; | |
add_header Pragma public; | |
add_header Cache-Control "public"; | |
} | |
# Uncomment one of the lines below for the appropriate caching plugin (if used). | |
#include snippets/wordpress-wp-super-cache.conf; | |
#include snippets/wordpress-w3-total-cache.conf; |
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
$values = FieldConfig::loadByName('node', 'BUNDLE', 'FIELD')->getSetting('allowed_values'); |