0

As the title says. I need to export a whole project I've been working on to a production website in a different location. I need to export the modules, views, blocks, everything BUT the content and the users. I don't want the content as I made dummy content, and the user is a dummy user as well.

I was thinking on making a distro, but then I'd be missing on the structure. I would export the structure, but I need the modules as well. What's the solution for this sort of issues? My other solution is to build everything on production again, which is going to be draining.

I would also use a Dev -> Stage -> Prod workflow, but this will be a one time thing.

3
  • Do you need anything from your database?
    – Gulok
    Commented Jun 20, 2016 at 22:34
  • Yes, the whole structure, content types, views, blocks, modules... Commented Jun 20, 2016 at 22:53
  • See my answer below.
    – Gulok
    Commented Jun 20, 2016 at 22:55

1 Answer 1

3

I would suggest to put your code in a version control like Git. There are many free services you can use like Github and Bitbucket. With Git you can easily ship your code from one server to another.

I need to export the modules, views, blocks, everything BUT the content and the users. I don't want the content as I made dummy content, and the user is a dummy user as well.

You can use Features to export your views, blocks, content types, permission and roles, configuration, and even settings stored in variable table (Strongarm).

With everything in Features you can then run a normal installation in production then enable the features one by one. Here are some execellent tuts about using Feature.

Related modules:

My other solution is to build everything on production again, which is going to be draining.

One of the great things in Drupal is making the development easier and simple. With Features module, or hook like hook_update_N you will never do the same task on every environment you have. Development must only be done in local machine.

I would also use a Dev -> Stage -> Prod workflow, but this will be a one time thing.

That is what Pantheon and Acquia are doing. You can build your own infra but that's another story.

4
  • Gonna upvote for helpful, but will check it once I see it working. Thank you! I will try just that. Commented Jun 21, 2016 at 1:14
  • Okay I've been trying using Features, and this definitely made the work just slightly easier, but I still have to rebuild everything in the target website. Really, if it was me, I'd try doing something like a literal website copy, except the content - and I dunno how to do that. I had to install Features Extra to export my blocks. I will try migrate for now. Commented Jun 22, 2016 at 5:48
  • There is a module called drupal.org/project/features_extra as an extension of Feutures.
    – Gulok
    Commented Jun 22, 2016 at 13:23
  • Another module is drupal.org/project/blockexport I havent used that but it looks promising.
    – Gulok
    Commented Jun 22, 2016 at 13:24

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.