I have a MySQL database with 2000 doctors, which are accessed classicaly through a HTML form and PHP. With the form you can search with criterias like ZIP, town, target group, treatment, languages, etc. Then a result list with doctors is shown and when clicking on one a profile page is opened with all the details of the doctor.

How can I migrate this to Drupal 8? I already read a lot and often Feeds is sugggested, but unfortunately it is not yet ready for Drupal 8.

  • 1
    If it were me, I would use Migrate and create Doctor as a custom entity, and migrate them in. Youc an store the address with Address field, and other fields as needed (selects, text fields, taxonomy). The search can easily be built with Views after that. – Kevin Jun 13 '17 at 19:02
  • I know that views can use filters, but how do you implement search fields? – 0711master Jun 28 '17 at 14:58
  • Install Search API and use Solr (if it were me). But you might get away with Search API DB. Then you just make a View of that index, and expose fields that you indexed as exposed filters. Expose the form as a block in Views, then place the block in Block Layout in the region you want to show it in. – Kevin Jun 28 '17 at 14:59
  • I'm not 100% sure if I understood everything you said, but I will experiment a bit with the module... – 0711master Jun 29 '17 at 15:23

The best and most flexible option at your disposal will be to use the Drupal Migrate module. It's included by default in D8.

The steps you'll have to follow is as below:

  1. Migrate your data from MySQl to a Drupal content type or an entity. You could also consider exporting your data to CSV and import from the CSV.
  2. If you are not expecting very large traffic, use views and exposed filter to implement your search form with filters. If you are expecting the more traffic and scale user search_api and use something like Solr in the backend.

Some of the links where you can get started:

  1. Migrate to Drupal 8 from MySql.
  2. Migrate to Drupal 8 from CSV file.
  3. Official Migrate API documentation.

I am assuming you already know what content type, entity, views, exposed filters etc are. In case you don't know any of it, plenty of resources are available online.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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