Back to Top

How To Reset resourceID in MODx

In this article, we will see how to reset resource ID in MODx Revolution.A resource represents a page in MODx and Each Resource has a unique resource ID.By Default, Modx uses resource ID for a link of MODx pages.

Sometimes you want to reset all resources and Its not possible from admin panel of MODx so I have reset the resources from the database.

Let’s see step by step to reset resourceID in MODx Revolution

NOTE: Make sure to take the backup of your database before executing any of the below steps because that will be useful if you fail at any step.

Step 1:

Open Database and go to the table {table_preix}_site_content table and take backup of table

Step 2:

Next,Truncate table {table_preix}_site_content by applying following query

Truncate table {table_preix}_site_content

Step 3:

Now, Insert one record into the table.It’s an insert query of home resource which will be required in table otherwise your site stops working.

INSERT INTO {table_preix}_site_content (id, type, 
										contentType, pagetitle, longtitle, description, alias, 
										link_attributes, published, pub_date, unpub_date, parent, 
										isfolder, introtext, content, richtext, template, 
										menuindex, searchable, cacheable, createdby, createdon, 
										editedby, editedon, deleted, deletedon, deletedby, 
										publishedon, publishedby, menutitle, donthit, privateweb,
										privatemgr, content_dispo, hidemenu, class_key, 
										context_key, content_type, uri, uri_override, 
										hide_children_in_tree, show_in_tree, properties) VALUES
										(1, 'document', 'text/html', 'Home', '', '', 'index', '', 1, 0, 0, 0, 
										1, '', 'test', 1, 1, 0, 1, 1, 1,, 1,, 0, 0, 0, 0, 0, '', 0, 0, 0, 0, 
										0, 'modDocument', 'web', 1, '', 0, 0, 1, NULL);

NOTE: Resource IDs are strictly joined with many snippets and packages So if you reset the ID the website can stop working. so pl take a backup before executing any of the above steps

Here are the few other articles which you might like:

Import Users in MODx
Move Modx Revolution to Live Server

Thanks for reading and feel free to share your thoughts! Don’t Forget to Follow us on Twitter or Subscribe us to Get the Latest Updates.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Most Popular Posts

WordPress Template Hierarchy Tutorial

Posted on 3 years ago


Step by step Node JS Tutorial for Beginner

Posted on 3 years ago


Hello world

Updated 1 month ago

Nick Carter

In depth Understanding of Laravel Core

Updated 3 months ago


ECMAScript 6 New Features – 2

Updated 1 year ago


The Reader’s Poll – June 2015

Posted on 4 years ago


The Reader’s Poll – August 2014

Posted on 5 years ago


The Reader’s Poll – June 2014

Posted on 5 years ago


The Readers’ Poll – May 2014

Posted on 5 years ago


The Readers’ Poll – August 2013

Posted on 6 years ago