Modx transfer pages from one site to another

Hi guys, i need to transfer about 300 pages from one site to another, both running modx Revo 2.7+, with the second site already having other pages. Totally lost on this issue, please share your advice and your experience.

Mark Hamstra’s ImportX is one way: ImportX.

How difficult it is depends on the complexity of your pages and what you need to transport.

The pages will almost certainly have be given new page ids, so they won’t conflict with those of the existing resources at the new site. This creates some potential problems.

The createdby, editedby, and publishedby fields, for example, are integer fields holding the ID of a user, who may or may not have the same ID on the new site. Similarly, the parent field holds the ID of the parent resource, which may or may not exist. If it doesn’t, the resource may not show up in the tree, or in some cases, no resources show up in the tree.

TVs are another issue. If there are TV values for any of the pages, they may be lost because a) their values actually involve three separate DB tables, and b) even if you capture them, they depend on the ID of the resource and the ID of the TV, which will likely be different at the new site.

It can be pretty simple to import resources if there are no TVs involved and you don’t need to retain the user info about who created, published, or edited them. Then all you need is a way to select the resources you want to move and some way of retaining the tree structure at the new site.

thanks for your answer, i tried to use this package but i get invalid fields error when i try to upload
table dump modx_site_content.csv

I don’t know what that would mean. Those are standard resource fields. Maybe @markh can help.

Hm, that’s odd. Can you post a small sample of your CSV?

its dump from phpmyadmin, but in CSV format

Field separator: ∓
Remove line breaks from fields: true

example of my csv

I think the problem is I haven’t updated ImportX in forever, and… it doesn’t actually support quoted field/value names.

Try applying this proposed change by creating the file it adds, and changing the system setting “importx.datatype” to “csvplus”. That should offer better parsing ans support your CSV out of the box.

I do expect to spend some time soon bringing ImportX up to date with 3.0 and resolving some issues like this.

thanks a lot, i try it in short future