Prerequisites: Using internal-sftp for sftp; rsyslog for logging
Step 1. Set up your chrooted directories
sudo mkdir /sftp/myshare
sudo mkdir /sftp/myothershare
Step 2. Create your groups for your chrooted users
# let's dig the server | |
dig example.com | |
# from the DNS answer we are interested in the authority section | |
#;; AUTHORITY SECTION: | |
#example.com. 79275 IN NS a.iana-servers.net. | |
#example.com. 79275 IN NS b.iana-servers.net. | |
# now we find out all subdomains | |
dig @a.iana-servers.net example.com axfr |
add_filter( 'post_type_link', 'my_post_type_link', 10, 3); | |
function my_post_type_link($permalink, $post, $leavename) { | |
if ($post->post_type == 'my-post-type') { | |
$meta = get_post_meta($post->ID, '_my-post-meta', true); | |
if (isset($meta) && !empty($meta)) | |
$permalink = home_url( "my-friendly-url/" . $meta . "/" . $post->post_name . "/"); | |
} | |
return $permalink; |
While nginx microcaching already solves page caching (as of static, rarely changing WordPress pages), the performance for dynamically generated pages (like WooCommerce shop pages and admin backend in general) can benefit greatly from additionally using an object cache. Object caching allows an application (in this case WordPress with its plugins, theme, etc.) to store prepared objects (mostly database queries) in a database and quickly retrieve them, therefore improving the performance of dynamic page generation. Object caching is (usually) transparent, which means that it shouldn't be noticeable by users and developers (except for the performance improvements of course).