How to Remove -2 from WordPress URL (Permalink)

You just created a new page on your business’ WordPress site. You hit Publish, and then check out finished page. In your address bar, you notice something you didn’t expect. Instead of a clean URL, there’s a -2 at the end. For example, the URL is mysite.com/about-2/ instead of mysite.com/about/.

You try to edit the page, delete the -2 from the permalink, and click OK. But the -2 stays!

Now it seems you’re stuck with an unprofessional-looking URL on your WordPress site. It’s not ideal. To get the permalinks you want for your business, learn why the -2 happens, and how you can get rid of it.

The Cause

Every post, page, and media file in WordPress has a unique permalink. When you create a new post, page or media file with the same name as a previously existing item, WordPress will add a -2 to the end of the permalink (URL). It prevents duplication.

WordPress automatically generates permalinks based on the title of the page, post, or media file. As a result, you might not be aware that the URL you’re trying to use already exists until the -2 pops up in the permalink.

The Fix

This video walks through how to how to remove the -2 from a WordPress URL (permalink).

What if your permalink problem isn’t that simple? You can still fix it with these steps.

1. Find the Item

Make sure you’re logged into your WordPress account. Type the desired permalink into your browser to see what's there. If something loads, you can click the Edit button in the Admin Toolbar at the top of the page and change it.

If that doesn't work, then you’ll have to do a little digging. Try the following in order:

Maybe the item isn't published. Search through your site's pages, posts, and custom post types (such as portfolio items or testimonials). To make this faster, use the search box on each of those pages in the WordPress admin area.

Maybe a media item is using the permalink. Search through the Media Library.

Maybe the item is in the Trash. Go to the admin page for pages, posts, and custom post types (such as portfolio items or testimonials). Then click the Trash link at the top of the page. Search there. You can't see the permalink of items in the Trash, so you'll need to first Restore the item, then click the All link at the top of the page and look there.

What if you still can't find the item? Search your database directly. We recommend you do this only if you're familiar with MySQL, because a misstep could break your site. Here's a tutorial on searching a MySQL database if you're familiar with MySQL but need specific instructions.

2. Change the Permalink

Once you find the item that has the permalink you want to use, you need to permanently delete it or change its permalink.

If you'll never need the item again: Delete it by clicking Trash or Move to Trash. Typically this action frees up the permalink immediately. If it doesn’t, go to Trash and hit Permanently Delete.

If you may need the item again: Edit the item, then edit the Permalink. Next click OK, and then Update.

There are a few extra steps to change the permalink of a media file. Edit the media item, click Screen Options at the top of the screen, and check the box for Slug. Scroll down to the Slug box at the bottom of the page and edit the slug. Click Update.

Once you’ve freed up your desired permalink, edit the item you want to have the permalink, and the Permalink. Click OK, and then Update (or Publish).

Let OptimWise Maintain Your WordPress Site

You'd rather manage your business than manage your WordPress site. At OptimWise, we know how to take care of WordPress sites for businesses.We’ve been doing it since 2010! Sign up for your WordPress Maintenance Plan today.

Filed Under: 

Want tips to rocket-boost your website?

Simply sign up.

38 comments on “How to Remove -2 from WordPress URL (Permalink)”

  1. I spent an hour trying to remove the -2 from a page because I had used the page name months ago and deleted it. But it did not show up in the Trash. Even tried to find it in the database to remove it. Watched your video and problem Solved in under 2 minutes.
    Thank You!!

  2. You really save lots of hours to me. I had 100+ pages what have -2 at the end of the page.

    Thanks you.

    My site's problem was media / images making url what page have. So, that encountered.

  3. Chad, I've been dealing with this issue for YEARS one of of the most important pages of my website. To update the page's content, I had resorted to logging into Cpanel, finding the page in the directory, and manually injecting new code into the copy field. This was the biggest pain in the ass I've EVER encountered online, but I had to operate this way because the single page was responsible for over 50% of my site's traffic! FINALLY, I screwed something up this morning that broke that process from working, and frantically Googling I uncovered your post, which led me to discover that there was a JPG image with the same name as the page, leading to the -2 and all the resulting issues. THANK YOU for saving me from this disaster I've been struggling to deal with for YEARS AND YEARS AND YEARS. Can't tell you how many hours of frustration has been wasted attempting to maintain this page, and searching for a solution to the problem.

  4. whenever i am trying to edit my page it add -2 in my permalink but it look fine in view page url but there is a problem if i update my edit page it also updated page-2

    1. Sorry, but I don't understand your question. Have you followed all the steps in this post to try to fix the problem? Have you been able to find what is already using the URL that you want to use for your page?

  5. I'm not able to resolve it. What am I doing wrong? Im facing this issue since a week on almost every second post I publish and I don't find any duplicate slugs, the page just redirects to the -2 slug page.

    1. Miisha, sorry to hear you're having trouble. Did you go through every step in this blog post? Did you check your site’s pages, posts, and custom post types (and the Trash for each of those)? Did you check your site's media? Were you able to search your database directly? If you do all those and still can't find the cause, I recommend asking in the WordPress support forums.

  6. Hello Chad.

    I am facing the '-2' issue in a page with a number in the URL.
    Let me explain you:
    I have a soccer site, and I have a league, which runs every year.
    I created a league landing page named as Premier Legue with the URL PL, so the permalinks looks like http://mysoccersite/pl/
    Later, I created a child page from the above page, which contains the team standings for this year, and is named as Premier League 2019, but with the URL 2019. So before update the page, the permalinks looks like http://mysoccersite/pl/2019/. But after updated it, wordpress add the '-2', so the permalinks shows http://mysoccersite/pl/2019-2/.
    I checked the trash, other pages, everything... and I do not have anything else named as 2019.

    Do you see a way to resolve my requirement?

    Thanks in advanced

    1. You say you already checked everything, but it would be worth double-checking all areas of the site (pages, posts, custom post types, Media Library, Trash for all these, etc.). It would also be worth checking the database directly. I recommend going through this post again, slowly and step by step.

  7. in my case the problem was same, page created but with a number in my case HVAC-2.. i went through this method and found out that i have image with this name. so not only pages or post but images can also create such problem.

  8. Holy crap! This permalink issue has been driving me nuts. This is by far the easiest solution and, quite frankly, the only one that has worked for me!

  9. Thanks a ton for this. I finally found the problem in the media gallery with an image by the same name. I'm pretty good with WordPress at this point but have never come across this before and never would have guessed it was an issue.

    I have a new build going with about 10 pages thus far. None had the same name. There are no posts, categories or tags. Saved permalinks again, nothing. Logged out and back in, nothing. Cleared cache, nothing.

    I was getting pretty frustrated by the time I searched for a possible answer and found this article. Great stuff.

    You learn something new every day.

Ready to Blast Off?

Let's talk.

Contact OptimWise
crossmenuarrow-right