WordPress SQL

Retrieving Article URLs for WordPress SQL Entries Over a Certain Length

In SQL programming language (scripting language) on WordPress, this article introduces how to retrieve article URLs for entries with more than a specified number of characters using SQL select statements. Retrieving articles with 800 or more characters. select post_title,guid,char_length(post_content) from wp_posts where post_type…

Shou Arisaka
1 min read
Oct 16, 2025

In SQL programming language (scripting language) on WordPress, this article introduces how to retrieve article URLs for entries with more than a specified number of characters using SQL select statements.

Retrieving articles with 800 or more characters.

select post_title,guid,char_length(post_content) from wp_posts
    where post_type='post'
        # AND post_status='publish'
        AND post_title REGEXP '.'
        AND post_content REGEXP '.'
        AND char_length(post_content) >= 800
        order by post_date desc
            ;      

Image

Share this article

Shou Arisaka Oct 16, 2025

🔗 Copy Links