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?
]]>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.
]]>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
]]>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.
]]>