• Hello, I would like to know if it is possible to change the ID of a page.

    I mean, I changed my website for a new one and I made the pages from scratch because I did not want to copy anything from the old one.

    There is a page that I would like to keep the ID so that it was the same as the old web page.

    How could I change the ID of that page?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    Side note: Once again (as with a lot of your topics) I’ve moved this out of Everything else WordPress to Fixing WordPress. You have a problem you want to solve; that’s where those topic belong.

    Hello, I would like to know if it is possible to change the ID of a page.

    You can’t and why would you want to? The ID for posts, pages, comments are dynamically assigned. You can change the slug but the ID stays the same.

    Hi @dfart,

    It is not possible to change the ID of a page, but you do can direct a request to a different page ID, by using the following code in your .htaccess file:

    RewriteEngine On
    RewriteCond %{QUERY_STRING} page_id={ID}
    RewriteRule ^(.*)$ /?page_id={ID} [NC,L]

    NOTE: Make sure you edit the {ID}’s

    Thread Starter dfart

    (@dfart)

    @jdembowski I thought it was here to put the issue, I do not do it on purpose, I’m wrong forum in which I have to ask the questions.
    I wanted to change it because I have an advertisement with a previous link that was very successful and indexed and I wanted to keep it that way.

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    Sorry, what do you mean by this exactly?

    I wanted to change it because I have an advertisement with a previous link that was very successful and indexed and I wanted to keep it that way.

    Emphasis added by me.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Change ID page’ is closed to new replies.