How do you search for a post or page with a certain url on the Wordpress admin panel? I have a page with the url www.tomatoes.com/promotions, but I can't find it by entering it in the search field of the post admin panel. Is there any way to do this? If not inside of the admin panel through MYSQL? I am not sure why the page and post search feature is so bad. I cannot find anything with it unless I enter the post_id


The easiest way is probably to make sure the admin bar is active on the front end and use the "edit post/page" menu item to get to the editor of that page.

.... but then it might be that the specific page is generate by code and in this case you will not be able to find it anywhere in the admin and will have to hunt for it in the code.


There is no built-in option where you can search posts via slug or search for words that only exist in the slug.

get_page_by_path() does exactly what you want. If you have a basic understanding of WordPress codex, you can easily make a Plugin/page template with a simple input field and print the result with the help of this function.

The slug is written in post_name column of wp_posts table. You have to use the slug, not the whole URL. WordPress does not store the whole link, the links are generated on the fly based on your permalink preference.

Sql Query for exact match:

SELECT * FROM `wp_posts` WHERE `post_name` = 'promotions'

SQL Query for partial match:

SELECT * FROM `wp_posts` WHERE `post_name` LIKE '%promotions%' 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.