For example: mydomain.com/embed automatically redirecting to homepage although I haven’t set redirection. I want to add a page in my website name embed and for this page URL automatically becoming mydomain.com/embed-2. I checked everything, there is no existing or trash post, page, tags Etc. How to remove that existing embed slug from the database? Thanks
I don’t exactly know about the word
embed, but by default WordPress reserves & uses these sort of words for internal use. I tried to create a page slug named
embed but it wouldn’t work for me either on my localhost or on my live server. Maybe this is reserved for WordPress oEmbed functionality.
Here’s some things you should check:
.htaccess file in the root folder of your WordPress installation. Check for any redirection rules.
Disable any SEO plugins (or specifically: redirection plugins — if
you use these) you might have installed. And actually you should probably just disable ALL plugins. Clear browser cache and temporary files, and reload the front-end of your website. See if the problem disappears. Enable plugins 1 by 1 until the problem becomes apparent once again. That will help to narrow down the culprit.
functions.phpfile to see if there’s been any
Here’s the query for checking your database for option #4:
SELECT * FROM `wp_postmeta` WHERE `meta_key` = '_wp_old_slug'
In the “FROM” line (second line)… Make sure you specify the correct name of your “Post Meta” database table. (Your table prefix may differ — but the default is
If you wanted to get extra specific with option #4 you could enter the slug which the page is being redirected to.
SELECT * FROM `wp_postmeta` WHERE `meta_key` = '_wp_old_slug' AND `meta_value` LIKE '%slug-to-search-for%'
Option #4 directly answers your question about locating and removing slugs from the database. However, it really could be any number of things… Hope this helps.