wordpress.org – WordPress blog posts permalinks giving 404 on nginx

I have the following nginx configuration to serve blog on /blog/ URL.

server {
        listen 80;
        server_name sqcg.in www.example.in;
        root /var/www/website;

        index index.html index.htm index.php;

        # Serve blog
        location /blog {
                return 301 /blog/;

        location /blog/ {
                autoindex on;
                alias /var/www/blog/;
                index index.php index.html index.htm;
                try_files $uri $uri/ /index.php$args;

                location ~ .php$ {
                        include snippets/fastcgi-php.conf;
                        fastcgi_param  SCRIPT_FILENAME    $request_filename;
                        fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;

        # Serve other files
        location / {
                try_files $uri $uri/ =404;

        location ~ .php$ {
                include snippets/fastcgi-php.conf;
                fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;

        location ~ /.ht {
                deny all;

The homepage is working fine at https://example.in/blog and also the admin panel is working perfectly https://example.in/blog/wp-admin/

When the blog posts permalink is set to plain, the blogs posts are opening fine with the URL


But on changing the permalink to another format blog/blog/2021/04/16/sample-post/, It is giving 404



I had requested logo suggestions in a competition.
So just now replied to each one of the current participants, thanking them for their work and to say that I would respond by the end of the week.
Then realised that each one of the replies had increased my post count.
Not sure if that was a no no here and if these replies would be deleted.

Write And Publish 5 Dofollow Guest Posts On High Traffic DA 89+ Sites for $25

Write And Publish 5 Dofollow Guest Posts On High Traffic DA 89+ Sites

Permanent and indexed links Permanent and indexed links require high authority guest posts for your site. I offering 5 Dofollow guest posts on authority general blog sites. Only cheap price.

White Caps Full Traffic on High Authority Sites 5 Dufflo Guest Post Write your post on blocked sites and publish a permanent post at a very low price. This is a limited offer and Google will be notified 100%. This is sure to make you a traffic jam. Give you a completely permanent guest post that helps rank your blog Easily available on search engines.

* The authority link is equal to 100 backlinks

Give you a unique article.

Also, give you anchor text and your targeted juice URL.

All high traffic site guest posts

Why choose our service?

Unique IP addresses

Permanent guest after black ink.

100% safe indicator

100% organic high traffic from Google.

Add relevant images and anchor text to your targeted URL.

Best post site on high authority site.

Order now! And increase your site traffic through the best quality guest post work. Please feel free to contact me.


woocommerce offtopic – Is it safe to delete from db orphaned posts i.e. whose post_parent no longer exists?

I inherited a couple of WP + WooCommerce shops with roughly 30,000 products for sale each, and a wp_postmeta which is over a million lines. The former webmasters ran away.

In an effort to clean up old stuff, I noticed a post_parent field in wp_posts, and queried the database for orphans:

SELECT ID FROM wp_posts WHERE NOT post_parent IN 
  (SELECT ID FROM wp_posts) AND post_parent>0 

and found thousands of records.
All of these records have a post_parent which no longer exists.

Just out of curiosity, I checked wp_postmeta:

SELECT * FROM wp_postmeta where post_id in
  (SELECT ID FROM wp_posts where not post_parent in 
     (select ID from wp_posts) and post_parent>0 ) 

and found 60,000 records.

Is it safe to delete them, along with any references from the tables wp_postmeta, wp_comments, wp_commentmeta, wp_term_relationships, wp_wc_product_meta_lookup ?

Else, can you suggest a strategy to clean up the database from spurious data?

How to disable send e-mail notification new comments for some posts

How to disable send e-mail notification new comments for some posts

Sorry for my English

Create 10 PBN Posts With High DA to Increase Site Ranking for $10

Create 10 PBN Posts With High DA to Increase Site Ranking

We will create 10 high DA posts using unique articles for only 10 $. If you order at another service, you will be given a spun article. And dont worry, We have a great team when it comes to content writing.

What is Guest Post / PBN Post?

PBN posts are a way to quickly and effectively increase site rankings since 2019. The incoming power of content is much faster than just social signals, comments, and profiles. Especially if the content created is in good quality domain quality, high DA, and there is no spam score.

What is Domain Authority (DA)?

Domain Authority (DA) is a website metric, which is a measure of the trustworthiness of a site developed by Moz. The size can be based on search engines and users. The greater the DA value of a site, the higher the level of user trust in the site.

What will you get from this service?

– 10 unique articles with 500 words per article.

– 10 domains free of spam and high DA scores.

– Article topics related to the niche of your site.

– 100% safe from google updates.

– PERMANENT dofollow backlinks to your site.


Q: How long does it take for this service to work?

A: 2 – 3 working days.

Q: How long will the power of this PBN be indexed?

A: It shouldn’t take long because of dofollow and we are using a premium indexer.

Q: Is it safe?

A: I have been in this field for a long time and I am sure it is 100% safe.

Q: Do you accept gambling and casino topics?

A: Yes, we do.

Best Regards and Stay Safe!

Kripto SEO Team


I want to display the most visited posts in the last 24 hours using Elementor

I want to display the most visited posts in the last 24 hours using Elementor – WordPress Development Stack Exchange

mysql – get posts whether meta_key exists or not

I am trying to get custom posts using $wpdb->get_results() as follows:

SELECT p.ID, p.post_content, p.post_title, p.post_excerpt, 
pm1.meta_value as meal_date, 
(case when pm2.meta_key is null then '' else pm2.meta_value end) as meal_plan,
t.name as meal_type 
FROM wp_posts AS p 
LEFT JOIN wp_term_relationships AS r ON (p.ID = r.object_id)
INNER JOIN wp_term_taxonomy AS x ON (r.term_taxonomy_id = x.term_taxonomy_id)
INNER JOIN wp_terms AS t ON (r.term_taxonomy_id = t.term_id)
INNER JOIN wp_postmeta As pm1 ON (p.ID = pm1.post_id)
INNER JOIN wp_postmeta As pm2 ON (p.ID = pm2.post_id)
WHERE p.post_type IN ('knl_meals') 
AND p.post_status = 'publish'
AND x.taxonomy = 'knl_meal_types'

AND pm1.meta_key = '_knl_meal_date'
AND pm2.meta_key = '_knl_meal_regular'

ORDER BY STR_TO_DATE(pm1.meta_value, '%M %d, %Y') ASC,t.term_id ASC, p.menu_order ASC, p.post_date DESC;

Basically, I want meal_plan to be meta_value for meta_key = _knl_meal_regular if it exists, otherwise empty string/bool false etc type value for the post but the post should be included in the results. Right now, it is excluding the posts if meta_key does not exist for a post.

WordPress Posts Multi Author without using plugin

I am trying to code a PHP page which I can allow multiple authors for posts.

At first I have my pageAuthors.php page, it allows me to choose my post and check for available authors. It is a simple form with an action that redirects it to a page showAuthors.php.

After being on showAuthors.php, you’ll have the post you choosed and the available authors in a checkbox with the publisher automatically checked.

You can check other authors for being co-authors.

Everything is okay but I dont know the query I should write to access different tables in the database.

I searched and found that I should at first:

  • Register a taxonomy using an array.
  • Update post count for published users.



All I need is the query to make give access to the other author to the and let him edit it.

Some useful links:

Where is Author Data Stored in the Database?

Where are WordPress Users and Permissions Stored in the Database?

Publish 5 Guest Posts on Linkedin, Behance, Medium, Diigo, Reddit – High DA90 & PA89 for $30

Publish 5 Guest Posts on Linkedin, Behance, Medium, Diigo, Reddit – High DA90 & PA89

I will write 500 words article and Write and Publish a guest post on Linkedin, Behance, Medium, Diigo, Reddit, with contextual nofollow backlinks , Google index guarantee – I don’t know anyone else who’s able to do this because almost all links on Reddit are nofollow.

First, I study your website content and come up with a timely, relevant story idea that would fly with reddit.com

5 Website SEOMetrics:

1. Linkedin DA97 & PA96

2. Behance DA90 & PA81

3. Medium DA95 & PA81

4. Diigo DA88 & PA74

5. Reddit DA90 & PA8

Benefits From this services offer:

1. The link is NOFOLLOW.

2. The link will get indexed in Google, so you can get all the SEO juice shooting up your SERPs ranking.

3. The turnaround time is 3 days.

4.500 Words Quality SEO Optimized Article by Hand Writing or Collect From Your Website.

My Requirements:

1. Website URL

2. Keywords

Thank You


DreamProxies - Cheapest USA Elite Private Proxies 100 Private Proxies 200 Private Proxies 400 Private Proxies 1000 Private Proxies 2000 Private Proxies ExtraProxies.com - Buy Cheap Private Proxies Buy 50 Private Proxies Buy 100 Private Proxies Buy 200 Private Proxies Buy 500 Private Proxies Buy 1000 Private Proxies Buy 2000 Private Proxies ProxiesLive Proxies-free.com New Proxy Lists Every Day Proxies123