Questions tagged [migration]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
101
votes
8answers
13k views

What's the best practice for handling data migration and organization across development environments?

This issue becomes especially difficult when there are multiple environments, with multiple developers working on different features that affect the data structure. The holy grail is a git-style ...
22
votes
4answers
6k views

How do I import data into Craft?

What's the best known way to import masses of data into Craft? Are there tools that support the migration of content/users from say XML, JSON etc.
14
votes
4answers
4k views

How do I migrate a Wordpress project to Craft CMS?

How do I migrate my Wordpress project to Craft CMS? What would be the best way?
11
votes
3answers
5k views

Migrating a whole website between Craft instances

A developer built our site locally configured as "craft.dev". At the same time, my sysadmin was busy getting Craft installed with Apache on our Linux server. He set that up with our real domain and ...
7
votes
5answers
2k views

Has someone figured out Craft 3 content migrations?

One of the big features for craft 3 is content migrations. Migrating fields and sections between environments (like deploying code to test or production). I'm just having a hard time figuring out what ...
7
votes
1answer
2k views

Migrated Server, Now Getting Logged Out Constantly

I just moved my site from one MediaTemple (gs) instance to another. I copied and recreated the database on the new server, moved over all the files, and updated the internal references that pointed to ...
6
votes
1answer
569 views

Using Yiic for plugin migration

I've been trying to follow the docs for creating a plugin migration (https://craftcms.com/docs/plugins/migrations) but any attempts to run yiic seem to die with: CDbConnection failed to open the DB ...
5
votes
2answers
1k views

Programatically Adding Fields to a Layout

I am looking to add a field (or perhaps a group?) to the userlayout via a database migration. I've looked over the docs, and found Is it possible to add a custom field to User model from a plugin? ...
5
votes
1answer
835 views

How to create a migration for the main Craft DB?

Let's say we add a section or other elements (field, category, tags, assets, etc) in the CP on our dev servers and want to roll that change out to a stage or production environment, is there a way to ...
4
votes
2answers
3k views

How do I create database tables for a craft cms plugin on install?

I am absolutely new to craft plugin development and could not find any documentation on creating database tables specific to a new plugin. How are new tables created when a plugin is installed? I am ...
4
votes
1answer
421 views

Migrating Craft site to another server — throws 404 for all pages but homepage

I've been asked to migrate a Craft site from one server to another. The new server setup is the same as the server I'm migrating from. I moved all the files in the webroot directory over to the new ...
4
votes
1answer
523 views

Why would I get a “CHttpRequest is unable to determine the request URI” when creating a migration?

I have logged into the server and attempted to create a migration for my plugin. However I get this output: exception 'CException' with message 'CHttpRequest is unable to determine the request URI.' ...
4
votes
1answer
277 views

Update Asset Index in Migration

I'm trying to index some asset volumes that I'm creating in a migration. These are local volumes which may already contain files. I'm hoping to avoid the step where I have to manually update the ...
4
votes
1answer
667 views

How do you import hierarchical data that uses the adjacency list model into Craft Structures or Categories?

Craft makes it nice and easy for us to have hierarchy in Structures or Categories. Many other popular CMS platforms support hierarchical data as well but some support it using a different data model. ...
3
votes
2answers
4k views

Migration of Craft CMS from one host to another

I'm a newbie in Craft CMS. I need to make changes in an existing craft website which is with one hosting platform. The site was previously managed by another developer. I need to migrate to a new ...
3
votes
1answer
816 views

Does a plugin runs it's migrations on install?

I'm developing a plugin, bumping the version number to run the migrations I'm creating but then, for sanity, checked they run when the plugin is installed for the first time, which doesn't seem to be ...
3
votes
2answers
934 views

Migrations for Deployment

Currently each time we make changes to our dev instance of our Craft install (add fields, plugins, change settings in CP), we dump the database and upload it to the production database server. This ...
3
votes
1answer
96 views

Error clearing a field via migration script

I'm using a migration script to clear out the values for a field on one of my entries. The field is an Entry Field and is not required. So I do this: $product->components = []; Craft::$app->...
3
votes
1answer
736 views

Running module migrations

I must be missing something or not understanding something. I'm trying to build a module for an install, and I'd like to run the initial migration. So the module initial install migration for the DB ...
3
votes
1answer
104 views

Migrating my Blogger site to CraftCMS

Has anyone migrated a Blogger site to CraftCMS? I'd like to migrate comments and posts. What is the best way to go about this? Could I import my site to Wordpress and then to Craft?
3
votes
1answer
145 views

Down Migrations

Currently in the source down migrations are not supported by Craft CMS. public function safeDown() { Craft::log('Down migrations are not supported.', LogLevel::Warning); } Why are they not ...
3
votes
1answer
347 views

Database structure for Craft 3 to import from external source?

Is there any best practice how to import info Craft 3 data from external source, or should I backtrack it from the database?
3
votes
1answer
435 views

project.yaml stopped syncing changes in the staging process

I'am a bit helpless at the moment, because my project staging workflow using project.yaml stopped working and a) I don't know why and b) have no clue if I can solve it. Problem: Until some days ago ...
3
votes
1answer
152 views

Craft periodically goes down due to plugin migrations

Our application seems to be crashing periodically, on a seemingly unknown cadence. Sometimes it goes down once every few days, and sometimes (like today, when I'm at the end of my rope) it goes down ...
2
votes
1answer
1k views

Craft 3: Update database after CMS upgrade via console command

Is there any craft command command (shell) which can be used to perform the database updates necessary after a CMS update? (e.g. Craft3 beta-28 to beta29 or multi version updates) Background: We are ...
2
votes
1answer
698 views

Moving from staging (MAMP) to live production server

I'm a long time WordPress developer who's moved over to Craft CMS (loving it). When moving over WordPress sites from MAMP to a live production server, I follow this process: Upload all WP files to ...
2
votes
3answers
2k views

HTTP ERROR 500 after move to live

I moved a site from staging to live. Prior to moving, I logged in to the Craft admin and cleared the caches. I copied the db to the new one and moved the folders like so… from… home/subdomains/craft ...
2
votes
3answers
2k views

How can I export or move content from one Craft system into another? (with exactly the same configuration)

Our client build tons of articles in our craft system instead of his. Both systems have the identical structure, in fact, his system is a exact copy of ours, which runs on a different server. How can ...
2
votes
2answers
626 views

What's the easiest way to migrate my local site data to my live site?

I've finished my site locally, and would like to migrate my data to my production database. I've already uploaded the templates, assets, etc, but I'm unsure how to 'dump and load' (referenced from ...
2
votes
1answer
276 views

Is it possible to import orders into Craft Commerce?

We have to migrate a CSV dump from a Drupal commerce shop to Craft Commerce. It is important to import ‘Order Email’ / ‘Username’, ‘Order Date’, ‘Ordered Items’ (Name or ID), ‘Item Price’. Address ...
2
votes
1answer
64 views

Best practices of converting an already created site into Craft CMS?

We have various clients who already have websites but would like us to optimize them a little bit and set them up on craft. Is there a more efficient way to do this than just hand coding all of the ...
2
votes
1answer
142 views

How to manage breakpoint releases when updating Craft via composer

When logged in to Craft, the "Utilities" tab will show you all the latest releases you can update to. In some cases, it will report that you have reached a breakpoint release: You’ve reached a ...
2
votes
1answer
359 views

Macro _self no longer possible in Craft 3

This used to work in Craft 2: {% macro richText(macroParam) %} {{ macroParam |striptags('<br><p><li><ul><a><strong><i>')|raw }} {% endmacro %} {# include ...
2
votes
3answers
923 views

How would one go about migrating fields?

Is there any "simple" way of migrating fields and layouts from one setup to another? Example; Two identical installations/setups have diverged, where some information on certain fields have changed (...
2
votes
1answer
141 views

Plugin migration quandary

When exactly are migrations run? I wrote a migration that runs and does its job properly if I run it via the command line: yiic migrate up Seomatic but despite the version number and schema number ...
2
votes
1answer
862 views

Issues migrating Craft site to a new host

We've tried moving an existing, live Craft site to a new host (where we currently just have http access via an IP). We simply copied all files (all 'craft' files, the index.php file and our related ...
2
votes
1answer
153 views

Migration from “Focal Point Field" for Craft to Native Craft 3 image focal point

Is there a migration from the “Focal Point Field for Craft“ plugin to the Craft3 native focal point? Or has anyone tried this themselves?
2
votes
1answer
632 views

Import-Export Matrixfield data

Have used the pretty neat Import and Export plugins from Bob Olde Hamsink. But, those two do not handle Matrix data. The question is basically: What is the 'most common way' to import and export ...
2
votes
1answer
75 views

Is it possible to add a custom error message when a migration is aborted?

I've got a plugin migration that returns false from its safeUp() method when certain conditions aren't met. Upon returning false from the migration, the update stalls, rolls back changes and gives an ...
2
votes
2answers
516 views

Bulk moving asset folders, from one source to another

I'm moving all of my assets from a local folder to Amazon S3. I've got my S3 source all set up, and I've been migrating folders over to it by dragging & dropping. The problem is, I have thousands ...
2
votes
1answer
70 views

How to import entries from Craft 2 to Craft 3?

So, I've been working on a Craft 3 upgrade, managed to set everything up, including configuring new plugins etc. Since I've started working on the upgrade process, some new entries have been published ...
2
votes
1answer
49 views

Correct way to getOrderByNumber() from my Plugin in Commerce 2

I am migrating my plugin to Craft 3 / Commerce 2. What is the best way to call another plugins method like craft()->commerce_orders->getOrderByNumber($number) from my plugins service?
2
votes
2answers
261 views

Problems with Craft CMS development strategy [closed]

Clearly Craft CMS is not a thing for non-developers (like WordPress or Drupal is). Despite the option to create fields, sections, etc. in the administration panel, we still need to code templates (...
2
votes
1answer
130 views

Using services/records etc in migrations

The database migrations documentation does say: Please note that we do not recommend using records directly within a migration Are there technical reasons for this recommendation, or is it ...
2
votes
1answer
129 views

What is the best way to handle Events that get triggered during a migration?

We have a Form plugin and an Email plugin. Users can setup the Email Plugin to send off notification emails when a particular Event happens. Some users setup a notification email to be sent when a ...
2
votes
0answers
21 views

What are the replacements for the order events onBeforeAddToCart and onBeforeGatewayRequestSend in Commerce 2

I'm looking for replacements for the events onBeforeAddToCart and onBeforeGatewayRequestSend. I used onBeforeAddToCart to prevent the user from adding an article from different article groups to the ...
1
vote
2answers
143 views

Importing members from EE without password reset

We've rewritten an EE site on Craft and now need to import the members. My understanding is that since passwords are hashed & not encrypted there is no way to transfer the passwords from EE to ...
1
vote
1answer
815 views

Migrate path from 2 to 3?

Anyone have experience updating a CraftCMS site from 2.* to the 3-beta? I'm not in dire need of this at the moment, but can't seem to find it in the developer resources. EDIT: Found the upgrade guide ...
1
vote
1answer
446 views

Migrating from Craft CMS to WordPress

I have recently discovered our company website is run on Craft CMS. However, I do not like the system and am much more proficient on WordPress. Is there a way to move our site to WordPress without a ...
1
vote
4answers
336 views

Migrated site - now dashboard keeps logging out

I've migrated my client's Craft site to a new host. On the front end the site is fine and working as it should. The problem is with the Craft admin area. I can login, but once logged I can’t access ...