The Easiest Ways to Reorder Pages in WordPress (All Methods Explained)
Reordering pages in WordPress controls both the structural hierarchy of your site and the sequence in which pages appear in navigation menus, REST API responses, and theme-generated page lists. By default, WordPress assigns every page an menu_order value of 0, which means pages render in alphabetical order unless you explicitly override that value — either through the block editor's Document Settings, a dedicated plugin, or direct database manipulation.
This guide covers every practical method for reordering WordPress pages, from the fastest drag-and-drop plugin to raw menu_order SQL updates, including the exact scenarios where each approach is appropriate and where each one silently fails.
Why Page Order Matters Beyond Navigation
Most tutorials treat page reordering as a purely cosmetic concern. It is not. The menu_order column in the wp_posts table is a queryable integer that directly affects:
WP_Queryresults whenorderby=menu_orderis passed — used by many page-builder templates and theme loops- REST API endpoint ordering (
/wp-json/wp/v2/pages?orderby=menu_order&order=asc) consumed by headless WordPress setups and mobile apps - Breadcrumb plugins (Yoast SEO, Rank Math) that infer hierarchy from parent-child relationships combined with
menu_order - Sitemap generation — some SEO plugins use
menu_orderto prioritize page crawl order insitemap.xml - Programmatic page trees rendered by
wp_list_pages()withsort_column=menu_order
Understanding this prevents a common mistake: developers reorder pages in the Menus editor, assume the problem is solved, then discover their theme's page loop or sitemap still reflects the old alphabetical sequence.
Method 1: Simple Page Ordering Plugin (Recommended for Most Sites)
Simple Page Ordering by 10up is the most efficient solution for sites with up to several hundred pages. It intercepts the standard WordPress admin list table and makes every row draggable, writing the updated menu_order values back to the database via AJAX on every drop event.
Installation
- In your WordPress dashboard, navigate to Plugins > Add New Plugin.
- Search for
Simple Page Ordering. - Click Install Now, then Activate.
Reordering Pages
- Go to Pages > All Pages.
- Hover over any page row — a drag handle appears on the left.
- Drag rows into the desired sequence.
- Release — the order saves automatically via AJAX. No "Save" button is required.
What This Plugin Actually Does Under the Hood
Every drag-and-drop action fires a POST request to wp-admin/admin-ajax.php with the action simple_page_ordering and a serialized array of post IDs in their new order. WordPress then iterates through that array and issues individual UPDATE wp_posts SET menu_order = %d WHERE ID = %d queries. On large sites with hundreds of pages, this can generate a burst of database writes — something worth monitoring if you are on a shared environment with query rate limits.
Limitations
- The plugin only affects post types that support
page-attributes. Custom post types must explicitly register'supports' => ['page-attributes']inregister_post_type(). - Pagination in the admin list table can cause confusion: dragging a page to the top of page 2 does not automatically place it after the last item on page 1. You must increase the "Screen Options" items-per-page count to see all pages on one screen before reordering across what would otherwise be paginated boundaries.
- The plugin does not reorder pages in navigation menus — those are controlled by a separate
wp_term_relationshipsstructure.
Method 2: Page Attributes — Manual menu_order Assignment
WordPress exposes the menu_order field natively in both the Classic Editor and the Block Editor. This method requires no plugins and is the right choice when you need to set precise numeric ordering for a small set of pages or when you are scripting bulk updates programmatically.
Block Editor (Gutenberg)
- Open the page you want to reorder.
- In the right sidebar, click the Page tab (not Block).
- Scroll down to Page Attributes.
- Locate the Order field and enter an integer.
- Click Update or Save.
Classic Editor
- Open the page editor.
- In the right sidebar, find the Page Attributes meta box.
- Enter a value in the Order field.
- Click Update.
Ordering Logic
Pages with lower menu_order values appear first. Pages sharing the same value fall back to alphabetical ordering by title. A practical convention:
| Page Title | Desired Position | `menu_order` Value |
|---|---|---|
| Home | 1st | 1 |
| About Us | 2nd | 2 |
| Services | 3rd | 3 |
| Portfolio | 4th | 4 |
| Contact | 5th | 5 |
Leave gaps between values (e.g., 10, 20, 30) if you anticipate inserting pages between existing ones later — this avoids having to renumber every page each time you add one.
Programmatic Bulk Update via WP-CLI
For sites migrating from another CMS or restructuring dozens of pages at once, editing each page manually is impractical. Use WP-CLI:
wp post update 42 --menu_order=1
wp post update 57 --menu_order=2
wp post update 61 --menu_order=3Or loop through an array using a shell script:
declare -A pages=([42]=1 [57]=2 [61]=3 [78]=4)
for post_id in "${!pages[@]}"; do
wp post update "$post_id" --menu_order="${pages[$post_id]}"
doneDirect Database Update (Advanced)
If WP-CLI is unavailable and you need to bulk-update menu_order values, you can run SQL directly. Always back up first.
UPDATE wp_posts SET menu_order = 1 WHERE ID = 42 AND post_type = 'page';
UPDATE wp_posts SET menu_order = 2 WHERE ID = 57 AND post_type = 'page';
UPDATE wp_posts SET menu_order = 3 WHERE ID = 61 AND post_type = 'page';This is particularly useful when managing WordPress on a VPS Hosting environment where you have direct MySQL access and need to apply structural changes across multiple sites in a single maintenance window.
Method 3: WordPress Menu Editor — Reordering Navigation Display
The Appearance > Menus editor controls the order in which pages appear in your site's navigation menus — this is entirely separate from menu_order in wp_posts. Changes here do not affect WP_Query results, REST API responses, or wp_list_pages() output.
Use this method when:
- Your theme renders navigation from a registered menu location (virtually all modern themes do)
- You want a page order in the nav bar that differs from the structural
menu_orderused in page lists - You need to nest pages as sub-items (dropdowns) without changing their actual WordPress parent
Steps
- Navigate to Appearance > Menus.
- Select an existing menu from the dropdown or click Create a new menu.
- In the Pages panel on the left, check the pages you want to include and click Add to Menu.
- In the Menu Structure panel, drag items into the desired sequence.
- To create a sub-item (dropdown child), drag a menu item slightly to the right beneath its intended parent.
- Click Save Menu.
Critical Distinction: Menu Order vs. Page Order
This is where many WordPress administrators introduce subtle bugs. Consider this scenario: your theme uses wp_list_pages() in a sidebar to display a page index. You reorder pages in Appearance > Menus, but the sidebar list remains unchanged. That is expected behavior — wp_list_pages() reads menu_order from wp_posts, not from the menu structure. To fix the sidebar, you must use Method 1 or Method 2.
Method 4: Full Site Editor (Block Themes) — Navigation Block
Sites running block themes (Twenty Twenty-Three, Kadence, GeneratePress block variant) use the Full Site Editor rather than Appearance > Menus. The Navigation block within the FSE has its own drag-and-drop interface.
- Go to Appearance > Editor.
- Click on the Navigation block in the header template.
- Use the List View panel (three-line icon in the top toolbar) to see all nav items.
- Drag items within the List View to reorder them.
- Click Save.
The underlying data model is identical to the classic Menus system — WordPress stores FSE navigation menus as wp_navigation posts — but the editing interface is entirely different.
Method 5: Programmatic Reordering with pre_get_posts
For developers building custom themes or plugins, the cleanest way to enforce page order without relying on menu_order values in the database is to hook into pre_get_posts and override the query arguments before execution.
add_action( 'pre_get_posts', function( WP_Query $query ) {
if ( ! is_admin() && $query->is_main_query() && $query->is_post_type_archive( 'page' ) ) {
$query->set( 'orderby', 'menu_order' );
$query->set( 'order', 'ASC' );
}
});Add this to your theme's functions.php or a site-specific plugin. This ensures that any template using the main query loop respects menu_order without requiring template file edits.
Comparison: All Methods at a Glance
| Method | Affects `menu_order` in DB | Affects Nav Menu Display | Requires Plugin | Best For |
|---|---|---|---|---|
| Simple Page Ordering plugin | Yes | No | Yes | Sites with many pages, non-technical editors |
| Page Attributes (Order field) | Yes | No | No | Small sites, precise numeric control |
| WP-CLI bulk update | Yes | No | No | Developers, migrations, bulk operations |
| Direct SQL update | Yes | No | No | Advanced admins with DB access |
| Appearance > Menus | No | Yes | No | Navigation display only |
| Full Site Editor Navigation block | No | Yes | No | Block themes |
pre_get_posts hook | No | No | No | Developers overriding query behavior |
Common Pitfalls and Edge Cases
Pagination boundary drag-and-drop: As noted above, Simple Page Ordering cannot move a page from page 2 of the admin list to a position on page 1 in a single drag. Increase the per-page count in Screen Options before reordering.
Child pages inherit parent context: When using Page Attributes, menu_order is scoped to sibling pages under the same parent. A child page with menu_order=1 will appear first among its siblings, but its position relative to pages under a different parent is irrelevant.
Caching layers invalidation: After bulk-updating menu_order via SQL or WP-CLI, object cache entries for page queries may still reflect the old order. On sites using Redis or Memcached object caching, flush the cache explicitly:
wp cache flushOn sites running a full-page cache (WP Rocket, LiteSpeed Cache, Nginx FastCGI cache), purge the page cache as well, otherwise visitors will see stale navigation for the duration of the cache TTL.
REST API consumers: If a decoupled frontend (Next.js, Nuxt, React) fetches pages from the WordPress REST API, it must explicitly request orderby=menu_order — the default REST API ordering for pages is by date descending. Update your API calls accordingly:
GET /wp-json/wp/v2/pages?orderby=menu_order&order=asc&per_page=100Multisite installations: On WordPress Multisite, menu_order is per-site. Running a network-wide WP-CLI command requires specifying --url= for each subsite or using --network with a custom loop.
Hosting Environment Considerations
The method you choose can depend on your hosting setup. On a managed Shared Web Hosting plan, direct database access may be restricted to phpMyAdmin, making WP-CLI or raw SQL updates less convenient — the plugin or Page Attributes methods are more practical. On a VPS with cPanel, you typically have full terminal access, making WP-CLI the fastest option for bulk operations. On a bare Dedicated Server with root access, direct MySQL queries and WP-CLI scripts can be integrated into deployment pipelines or maintenance cron jobs.
If you manage multiple WordPress installations and need consistent page ordering across environments, encoding menu_order assignments in a WP-CLI script and running it as part of your deployment process is the most reliable approach — it eliminates manual steps and is version-controllable.
For sites that rely on a professional email presence alongside their WordPress setup, pairing your hosting with a dedicated Email Hosting service ensures your contact and support pages — which often need to be prominently ordered — are backed by equally reliable communication infrastructure.
Technical Key-Takeaway Checklist
Before choosing a reordering method, verify the following:
- Identify what you are actually reordering. Navigation menu order and
menu_orderinwp_postsare independent. Confirm which one your theme reads. - Check your theme's page loop. Does it use
wp_list_pages(), a customWP_Query, or a registered menu location? Each reads from a different data source. - Use Simple Page Ordering for editorial workflows where non-technical users need to reorder pages regularly without developer involvement.
- Use Page Attributes or WP-CLI for precision when you need specific numeric values or are scripting a migration.
- Never use Appearance > Menus alone if your goal is to affect
WP_Query-driven page lists, sitemaps, or REST API consumers. - Flush object cache and page cache after any bulk
menu_orderupdate to ensure all layers reflect the new order immediately. - Leave gaps in
menu_ordernumbering (10, 20, 30 rather than 1, 2, 3) to accommodate future insertions without full renumbering. - For headless WordPress setups, always pass
orderby=menu_order&order=ascexplicitly in REST API requests — do not assume default ordering.
Frequently Asked Questions
Does changing page order in Appearance > Menus affect SEO?
No. Navigation menu order has no direct effect on menu_order in wp_posts, sitemap priority, or crawl order. However, if your theme generates breadcrumbs or page indexes from wp_list_pages(), those are driven by menu_order in the database — update that separately using Method 1 or Method 2.
Why does my page order reset after updating a page?
This typically happens when a plugin or theme hook runs wp_update_post() on save and passes menu_order=0 explicitly. Audit your active plugins with add_action('save_post', ...) hooks and check whether any are overwriting the menu_order field. The Simple Page Ordering plugin does not protect against this — you need to identify and patch the conflicting hook.
Can I reorder pages without a plugin in the Block Editor?
Yes. Open any page, go to the Page tab in the right sidebar, expand Page Attributes, and set the Order integer field. This writes directly to menu_order in wp_posts. No plugin is required.
Does Simple Page Ordering work with custom post types?
Only if the custom post type was registered with 'supports' => ['page-attributes']. If you control the post type registration, add that support string. If it is a third-party post type, you can add support programmatically in functions.php:
add_post_type_support( 'your_post_type_slug', 'page-attributes' );What is the maximum value for menu_order?
The menu_order column in wp_posts is a signed 32-bit integer (INT(11)), so the maximum value is 2,147,483,647. In practice, use values in the hundreds at most — extremely large values can cause unexpected behavior in some theme functions that perform arithmetic on menu_order for visual offset calculations.
