-
MODX Staff
- 10,725 Posts
There’s really no easy way to do it. These values are assigned to the records by the database, and are used to represent those rows in other tables that store data related to those pages. You’d have to write a migration script to dump the data, reset the auto_increment value and reinsert the data without the id column into the site_content table, and then find every other table with a reference to the site_content primary key, and map the old key value to the new one you’ve assigned. In other words I don’t recommend it, unless you have some very keen SQL skills.
My SQL is pretty poor tbh im more xhtml, php, css and js minded.
Do you think i’d be better off backing up my code to txt files and then doing a fresh install? At least that way i could insert the data as i want it ordered.
Oh and thanks for the quick responce.
-
MODX Staff
- 10,725 Posts
If all you’ve done is add content to pages and have avoided adding keywords, metatags, TV’s, and all sorts of other stuff that can be related to pages in MODx, just dump the data (not structure) of the site_content table from phpMyAdmin with complete and extended inserts option, edit the resulting INSERT statement to remove the id field and corresponding values from the SQL it generates, then truncate (a.k.a. empty) the site_content table (modx_site_content if you used the default database table prefix when installing), and then execute the edited INSERT statement you dumped.