Can’t access new WP install on subdirectory

From your comment I know that you are using nginx. Nginx need a bit different configuration than Apache. Probably your current nginx vhost looks like that. server { listen *:80; server_name test.dev; root /var/www/test; access_log /var/log/nginx/access.log; error_log /var/log/nginx/error.log; index index.php index.html; location / { # try to serve file directly, fallback to index.php try_files $uri … Read more

WordPress and NGINX – permalinks are not working with ending slash

I don’t think you need this rewrite rule to add forward slash. WordPress will make redirect for you. I’m using this code to debug redirection: function wpse_287994_debug_redirect( $url ) { echo $url; die(); } add_action( ‘wp_redirect’, ‘wpse_287994_debug_redirect’ ); When I’m trying to visit address http://example.com/lorem-ipsum (this page must exists) above script will output http://example.com/lorem-ipsum/ so … Read more

Remove base category gives 404 error

Just enter “https://wordpress.stackexchange.com/” OR ‘.’ (without quotes) as the value for Category base. Seemed to work perfectly when I tested it. I’d be interested in hearing if anyone discovers other dangers to doing this, other than the obvious potential of collisions between posts, pages, and categories.

Issue with Custom Post Types and Permalinks

I don’t recommend using category as cpt try rename it for example in product-type. For more information on category see on codex: Taxonomies function my_custom_post_product_type() { $labels = array( ‘name’ => _x( ‘Product Types’ ), ‘singular_name’ => _x( ‘Product Type’ ), ‘add_new’ => _x( ‘Add New’ ), ‘add_new_item’ => __( ‘Add New Product Type’ ), … Read more