NGINX
Serve all assets:
location ~ ^(/wp-content/themes|/wp-content/uploads)/.*\.(jpe?g|gif|css|png|js|ico|pdf|m4a|mov|mp3|webm|mp4)$ {
rewrite ^ https://mydomain.com$request_uri?
permanent;
access_log off;
}
/*Change url page to stran*/ | |
if ( ! function_exists( 'lr_page_to_seite' ) ) | |
{ | |
register_activation_hook( __FILE__ , 'lr_flush_rewrite_on_init' ); | |
register_deactivation_hook( __FILE__ , 'lr_flush_rewrite_on_init' ); | |
add_action( 'init', 'lr_page_to_seite' ); | |
function lr_page_to_seite() | |
{ | |
$GLOBALS['wp_rewrite']->pagination_base = 'stran'; |
//Allow svg | |
function cc_mime_types($mimes) { | |
$mimes['svg'] = 'image/svg+xml'; | |
return $mimes; | |
} | |
add_filter('upload_mimes', 'cc_mime_types'); |
NGINX
Serve all assets:
location ~ ^(/wp-content/themes|/wp-content/uploads)/.*\.(jpe?g|gif|css|png|js|ico|pdf|m4a|mov|mp3|webm|mp4)$ {
rewrite ^ https://mydomain.com$request_uri?
permanent;
access_log off;
}
/* iOS Fix for Flexbox */ | |
.flexboxclass:first-child { | |
flex:1; | |
-webkit-box-flex:1; | |
-webkit-flex:1; | |
} |
DELETE FROM wp_usermeta WHERE user_id NOT in (1); | |
DELETE FROM wp_users WHERE ID NOT in (1); |
wp plugin install wp-crontrol user-switching transients-manager query-monitor post-meta-inspector disable-emails email-log
wp plugin activate wp-crontrol user-switching transients-manager query-monitor post-meta-inspector disable-emails email-log
add_filter( 'cron_request', function( $args ) {
$args['url'] = set_url_scheme( $args['url'], 'http' );
return $args;
} );
find ./ -name "*.jpg" -exec magick mogrify -resize 100x100 {} \;
name: pagename | |
recipe: wordpress | |
config: | |
env: dev | |
xdebug: true | |
webroot: . | |
via: nginx | |
proxy: | |
appserver: | |
- pagename.lndo.site |
<?php | |
$seed_words = [ | |
'word1', | |
'word2', | |
'word3', | |
]; | |
$files = []; |