Home Web Development How to change a Wordpress page or post ID
How to change a Wordpress page or post ID PDF Print E-mail
Written by Tom   

At one point I had to update a page ID of a non-existent Wordpress page with a 404 error on the URL to new page.


To load the new page on the 404 error URL you will have to create page in the Wordpress admin, then update the SQL database to match the 404 error page ID.


Below is a 404 error, the page id 369 does not exist.



To fix this login to the admin section and create a new page.

Publish the page and get the shortlink.

Note the page id of the new page, in this case 1930.


Access the SQL Database of the website.

Click of _posts table.

Find the published post with the id 1930, in the ID column.


Change the ID to 369 and save the database.


The 404 error will now be fixed and will load the new page.