0

I want to migrate all my content from my old D7 website to my new D7 site, with the Features module I exported/imported all my custom views, fields, etc.

But I don't understand how to export content.

Is there a way to do it from PHPMyAdmin? My two sites are on the same host. I have zero content in the new website. Can I overwrite the tables?

2 Answers 2

1

Is there way via phpMyAdmin or importing SQL into the database? Yes. Between 2 Drupal installs of the same version that is possible, but that comes with a big caveat. You need to know exactly what you're wanting to import and that you're not missing anything.

For example, say you want to import roles. You could export/import the role.sql from the role table, but that would only get you the role definition. If you want the permissions with those roles, you'd need to copy over the role_permission table. Depending on your needs this might work; the smaller number of table dependencies, the easier this approach can work without a problem.

However, in your case, you've mentioned a few Drupal components that span multiple data tables (e.g. node types, views, fields, etc.), not to mention other configurations (e.g. module settings in the variable table) that a module might depend on to behave the same between 2 installs. To take the example above, the role_permission is filled with permission items that are created by various modules. There might be a problem if you don't have all the same modules installed on your new site.

In these cases, and in general, you're better sticking with the tools that the community has created to handle importing the various components of Drupal. For example, the maintainers of Views have already built in a export/import feature for views. There many posts on Drupal Answers discuss these tools (and how to use them). Here are a few examples:

2
  • Thanks for help. I already have all my views, all my users etc etc, all I need is my content.
    – Tourist
    Aug 31, 2015 at 8:11
  • None of the modules above can import or export content if you are using paragraphs, I can't make it work anyways Oct 19, 2017 at 13:41
0

Actually i think, its no good idea to export/import nodes directly via mysql.. there are to many problems like timeouts, awrong machine names and so on...

I would go a way like this post mentions: Node Export and VBO

In this case, the user wants something pretty similar to your goals and you definitely should check out VBO and node export

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.