How to change page id in Wordpress?

DaRecordon

Well-known member
Registered
Joined
Oct 7, 2016
Messages
247
Points
18
I want to change my page id in my wordpress blog? how can I do that?
for example, my WP page id is: example.com/?p=62 but i want to change example.com/?p=156 because I tried to check with page id that equals 156 but there is no page there and I can use this id, to be honest, I am using a code to display content according to page id and I want to change them when needed.
 

24x7serverman

Well-known member
Hosting Provider
Registered
Joined
Jul 25, 2017
Messages
651
Points
28
I would suggest, use the permalink setup instead of updating page ID. If you'd like to update the page ID then you will need to update the database values and it's complicated. If you will assign the permalink structure then it will gibe the best URL and will be useful for SEO ranking.

You can select the required permalink structure from wp-admin > Settings > Permalinks.
 

Dr. McKay

Well-known member
Registered
Joined
Nov 26, 2016
Messages
565
Points
28
@DaRecordon you can not change page ID directly on Wp-admin that you need to change it from your WP database (MySQL)
because WordPress pages are stored in wp_posts table thus you need to open PHPmyadmin from your web hosting control panel and browse to ID field and edit it.
After update ID there, you can see your page is updated with a new page ID.
 
Latest Threads
Replies
1
Views
23
Replies
0
Views
175
Replies
1
Views
37
Replies
2
Views
81
Recommended Threads

Latest postsNew threads

Latest Hosting OffersNew Reviews

Sponsors

Tag Cloud

You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an alternative browser.

Top