15

I created a page titled company. But the permalink turned it into /company-2/, trying to change it to just /company/ doesn't work. The website just has 8 pages and none is called company (don't know if company as page title is used in the past?).

What can i do and what is the cause? Where should i look? Not afraid to use phpmyadmin ;)

regards

  • 1
    I can confirm, items in the media library with the same name as your page will cause the numbers to be appended to your page permalink name. – Chris Jun 15 '17 at 13:47
  • If you are absolutely sure you have no other pages etc with this slug/name, in trash or not, it MIGHT be the Yoast redirect! It was IT in my case and thanks to Kman I solved it! Thanks!! – Roza Jun 17 '17 at 20:45
11

Check the slugs of the other pages - chances are /company/ is being used for one of those. You could also go to /company/ on your site and see if anything pulls up.

As mentioned in a comment, make sure to check the trash as well. You may have deleted a page with that name, but if it is still in the trash you can not reuse the name.

  • 6
    to that point, make sure you check the "Trash" as well – The Z Man Mar 6 '12 at 18:44
  • yep, Trash was the problem. This is a clean testing website. Turns out my lovely partner made some testing pages and trashed them directly. – alex Mar 6 '12 at 19:04
  • 1
    Just want to add that images with that slug could also cause the problem. So if all posts, pages, categories, and tags are checked, go to the media gallery and search for the slug name there such as "company". Find the image, click edit, show slug by using screen options, then rename if needed. – Devin Peterson May 25 '18 at 20:43
6

You're close. The permalink cannot be changed because at some point another page titled 'company' was drafted (not necessarily published). Unfortunately, there isn't much that I know of that you can do from WordPress to change this besides naming the page something else. However, you could go into the database if you have access and look in the 'wp_posts' table. Keep searching under the 'post-title' column until you find one that is simply 'company' and delete it. This should, in theory, solve your problem.

  • tx @cmegown, haven't look in the trash – alex Mar 6 '12 at 19:04
4

I had the same problem and did everything that is normally suggested (empty trash etc)..I found the problem was that I had an image in the gallery with the same name as the page. Deleted the image, uploaded it with a new name and the problem disappeared.

2

In my case, I was trying to rename /gallery/2010-2/ to /gallery/2010/. This is similar to your case, except I was trying to rename the page slug to a number. This is prohibited by wordpress since numbers are reserved for archive type pages. There may be other restrictions I didn't look them up. Hopefully this helps somebody else who ends up here after searching for "Can't change WP page slug".

1

I had this problem. And I checked all forums and trash and drafts and images with the same name. In the end I fond the problem with my incorrect usage of Yoast plugin - the redirect section. I created a redirect for a page which did not exist and that blocked me from creating a page with that url. Once I deleted the redirect I was able to rename the slug.

0

You've got another post/page with the same slug (probably in your trash) that already has take that. Find it and do your thing with it :)

0

As others have suggested, this looks like a duplicate slug or (post_name) in another WordPress item. Since most every piece of content in WordPress is stored in the posts table (usually wp_posts), the following SQL will help you quickly narrow down which item is causing the problem by returning anything starting with company.

Open up MySql ( phpMyAdmin works ) and enter this in the SQL tab.

SELECT ID, post_title, post_name, post_type 
FROM `wp_posts` 
WHERE post_name LIKE 'company%'
ORDER BY post_name

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