Skip to main content

Questions tagged [migration]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
29 views

Deleting old field after migration

I want to replace field X from an entryType by another field Y and migrate the content. I did it that way: add field Y in the config (saved to git) wrote a migration script for all entryType ...
lejoe's user avatar
  • 3
0 votes
2 answers
48 views

Craft2 migration to new server - storage isn't writable by PHP. Please fix that

I am migrating 2 separate Craft2 websites (in IIS v7) to a new webserver. I used Microsoft's WebDeploy utility to move the site files and their settings, and then I exported the dbs from each site, ...
buck1112's user avatar
  • 410
1 vote
3 answers
170 views

DDEV and Craft project structure problem

I'm working on a Craft site for a company that wanted me to change the usual folder structure of the project. Instead of it being -config -storage -templates … -public they wanted to group all the ...
Tyssen's user avatar
  • 665
2 votes
1 answer
1k views

Redactor to CKEditor Migration

Since Redactor is abandoned I've moved to CKEditor. There are plenty of entries with external links that are target blank with rel nofollow added. This has been altered (console command used as ...
Mark H.'s user avatar
  • 411
2 votes
1 answer
34 views

Can I empty the storage folder when migrating a Craft CMS site?

I am moving a Craft CMS to new webhost and followed this instruction. I read in another Stackoverflow post and also on this page that the /storage folder mainly contains cached, temporary files. Is it ...
flip's user avatar
  • 159
1 vote
1 answer
347 views

Content Migration in Craft 4

We are presently working on content development on the staging site. Once UAT is complete and approval is obtained, we intend to transfer this content to the production site. However, we have ...
Selva's user avatar
  • 11
1 vote
1 answer
99 views

My secondary site keeps going back to the primary url after changing urls

I have a craft site that was in developement. the main site was linked just to an IP address the secondary site was linked to a url. Everything was working perfectly, I could see each site ...
rudtek's user avatar
  • 169
1 vote
1 answer
113 views

I created a demo site and now want to set live url. How do I do that?

How do I tell craft to change to the new URL?
rudtek's user avatar
  • 169
1 vote
1 answer
84 views

Tables not created when plugin installed

I've got a plugin that works on Craft 4.5. It's been installed a long time, upgraded from 2.x to 3.x. Now trying to use it on a new install of Craft 4.5.10, installing it does not create any tables. ...
kr37's user avatar
  • 1,355
0 votes
0 answers
127 views

Migrating from CraftCMS to Wordpress (Metadata question)

My company is working to migrate 7 websites into a single integrated website. However as we are migrating this with our CMS partner we are seeing that no metatitles and metadata are being transferred ...
user14503's user avatar
1 vote
0 answers
48 views

Bulk Entries Migration works on local, but not updating elements in production

I'm trying to bulk update records based on a condition but the entries are NOT getting updated even though the migration seems to go through. Both code samples below work locally but NOT in production ...
cballenar's user avatar
  • 111
1 vote
1 answer
106 views

Programatically enable an entry

I'm creating to updating the title of some entries via a content migration, but this apparently doesn't work on disabled entries. So I'm trying to enable the entries to start, but that is also having ...
supazu's user avatar
  • 526
1 vote
1 answer
55 views

Get default field values on pre-existing elements

related to How can I populate a dropdown via table field type using the default values? I created a table to be used for ordering a display via the order of the table, with a bunch of default values ...
Eric Anderson's user avatar
1 vote
1 answer
114 views

Craft CMS 3.8 - Field not found after changing entry type, but then is found after running again

I'm currently using migrations to change/swap content. On certain entries, there are assigned category fields attached to specific entry types. I am consolidating all of these to a single category ...
Cat Named Dog's user avatar
1 vote
1 answer
62 views

How to migrate a selection of users passwords from a Craft 3 to a separate Craft 4?

I'm trying to move a large batch of users from a Craft 3 to a separate Craft 4 websites (only some selected data should be migrated). Element API + FeedMe looks like the right solution for that, as ...
Romain P.'s user avatar
  • 1,917
1 vote
1 answer
146 views

How can I resolve this Craft migration error on running migrate

I get Invalid general config setting: SITE_URL When running the final Craft4 migration CLI Any ideas?
joomkit's user avatar
  • 2,082
1 vote
2 answers
158 views

How to programatically disable an entry for a specific site

We have a multi-site setup where we would like to disable a bunch of entries on the primary site only. They entries should still be enabled for the second site. I'm working on a migration that looks ...
Dalton Rooney's user avatar
1 vote
1 answer
65 views

Error when Project.yaml Migration from Local

I'm getting the following error when migrating the project folder over to my live environment. Never had this before and unsure what to do. error: SQLSTATE[42S02]: Base table or view not found: 1146 ...
JMKelley's user avatar
  • 1,446
1 vote
1 answer
279 views

After Craft CMS v4 Update: Getting unknown property: craft\models\Volume::settings

Our staging environment update to Craft v4 seemed to work fine, but now on production we're getting this error when trying to send email confirmations after successful orders (happens in the queue job)...
Meinhard's user avatar
1 vote
1 answer
137 views

Save matrix/neo field value programmatically only for one site/locale

During the sample content migration I save programmatically the matrix/neo field value in entry using saveElement method. In field settings is set "Only save blocks to the site they were created ...
Alex Kuzmin's user avatar
0 votes
2 answers
278 views

How to disable all entries of certain section types?

I need to disable all the entries of 3 (related) sections. After that I'll be running some imports and all actual data will be enabled again (within the correct sites). We're talking about around 2....
7ochem's user avatar
  • 175
1 vote
1 answer
556 views

Best way to do migrations on CraftCMS4

I'm trying to find out how to organize the cooperative work with a project on CraftCMS4. For example, I want to check a branch from a college that developing a new module, and switching to his branch ...
Alex Kuzmin's user avatar
2 votes
1 answer
183 views

Updating specific field in from block in matrix field via migration

I'm trying to update a specific field (a dropdown) in an existing block (of type 'subhoofding') in an existing matrix field 'contentBuilder' The migration itself runs fine, show the new value as ...
Tim Bertens's user avatar
2 votes
1 answer
266 views

Migrating a Craft 4 instance from MySQL to PostgreSQL

I've managed to convert a fairly basic Craft 4 MySQL db to PostgreSQL using the pgloader tool, which came with it's own auth related issues when running PSQL v14+ instance - see https://github.com/...
Rich D.'s user avatar
  • 45
1 vote
1 answer
36 views

How to create multiple migrations that depend on each other

lets say i want my plugin to have migrations that: create entry section create field group create text field, belonging to newly created field group assign text field to entry type field layout ...
Piotr Pogorzelski's user avatar
0 votes
0 answers
272 views

getDiscountByCode(): Argument #1 ($code) must be of type string, null given

I migrated to craft 4 according to the migration guide and everything went well. Steps to reproduce Migrate to craft Add something into the cart On the Cart template there is the following error on ...
KSPR's user avatar
  • 3,788
1 vote
1 answer
35 views

Migrations out of sync

I am trying to update a craft website. However this fails. Looking into the migrations table, there were no migrations where track column is "craft", there were some where the track was &...
Bregt Vanbilsen's user avatar
1 vote
1 answer
126 views

Remove deleted migration content without migrate/down

I've started to play around with content migrations and have been following the Craft Quest course on the subject. I'm not sure if this is a situation you should ever find yourself in, in an ideal ...
Wally's user avatar
  • 343
2 votes
1 answer
408 views

How to add and run migration from plugin root folder?

I'm trying to add a new table to an existing plugin. I can't add it to the Install migration as I want existing installations to pull the change. The problems I ran into: I can't run Craft CLI (php ...
Matanya's user avatar
  • 492
1 vote
1 answer
544 views

migration failed m210613_145522_sortable_global_sets

I am getting this error when processing the upgrade m210613_145522_sortable_global_sets m210613_184103_announcements m210829_000000_element_index_tweak applying m210613_145522_sortable_global_sets ...
JohnC's user avatar
  • 61
3 votes
1 answer
2k views

Upgrade to Craft 4

Anyone succeeded in upgrading from Craft 3 to Craft 4 ? Before staging the changes on our dev server, I tried it locally without success. Although it seems pretty strait forward, I updated all plugins ...
Sylvain Tremblay's user avatar
3 votes
1 answer
808 views

DB CPU running at 100%, Pages Never Load, Moving from MySQL to MariaDB

I've been running a somewhat busy database (~800Mb) in GCP SQL. Due to the cost of it I've been working on migrating to a custom server running MariaDB. Which I'd heard could be much more cost ...
cballenar's user avatar
  • 1,419
1 vote
1 answer
395 views

Migrating Craft CMS 2 to 3

I have a craft CMS 2 codebase that a former developer had made for running on our PHP 5 server. Recently, the server upgraded its PHP version to 7.3 so I am trying to migrate the website to a later ...
Joseph D's user avatar
2 votes
1 answer
527 views

Newbie: Migrating Craft website to new host questions

I've no experience of Craft but do have 'historic' (pre Gutenberg) experience of front-end Wordpress. From the Dashboard they seem very different. Am investigating migrating to new host as we are ...
JayWhyPea's user avatar
1 vote
0 answers
308 views

Migration fails during update to 3.7.7

I'm updating a Craft installation from 3.5.17.1 to 3.7.7 and it's failing when applying migrations. I'm trying to do the update via CLI on MAMP. Here is the relevant part of the error: *** applying ...
artmem's user avatar
  • 1,022
1 vote
1 answer
81 views

Reapplying Users and Related Content to Database During Pipeline Promotion

I was on a dev ops call this afternoon and am wondering about the viability of a proposed solution for pushing changes to a Craft product through a dev pipeline. For context, this is for a big company ...
Christopher Spence's user avatar
2 votes
1 answer
294 views

CraftCMS admin login page error "Account Suspended"

Our website was created a couple years ago and our web designer is no longer with us. We have had access to the admin portion of our site and this is how we keep it up to date. This week when we went ...
lisa's user avatar
  • 21
1 vote
2 answers
388 views

Synching content and template files across environments

I'm new to CraftCMS and have a few basic questions about synching contents between local and remote development environments. This has been discussed in other posts by I'm looking for more specific ...
mauricio's user avatar
  • 187
1 vote
0 answers
289 views

Craft warning: Tried to release a savepoint, but it does not exist

I'm working on a plug-in for Craft 3. For this plug-in is a migration is needed. When this migration runs and adds the entries, fields, and groups then the following warning occurs in the logs. [...
randomGuy's user avatar
4 votes
1 answer
374 views

what is the correct way to programmatically set checkboxes (MultiOptionsFieldData) in a migration? (solved)

I need to update existing entries after the creation of a checkbox fields, to apply the default value to everything that was created before the availability of the new field. The code should run in a ...
pecus's user avatar
  • 181
2 votes
1 answer
1k views

Understanding migrations and CLI commands

Can someone please help explain some basics regarding migrations and the associated CLI commands to help troubleshoot when things fail? Specifically, How does craft know which migrations have been ...
Douglas McDonald's user avatar
4 votes
1 answer
451 views

Automated deployment with content migrations and structural changes

In the knowledge base article there are 4 steps described to automate the deployment process Pull updates for git Run composer install Run migrate/all Run project-config/apply The problem with this ...
Tim Bertens's user avatar
1 vote
1 answer
44 views

After Migration from v2.9 to 3.5 - some entries added into an entry-relation-field get added twice after saving

We migrated a craft cms site with 3 locales from v2.9 to 3.5 We have a section with a field of type "Entries". When editing the entry, and adding certain entries to this field, those get ...
Chris Angel's user avatar
1 vote
1 answer
71 views

Kentico to Craft

We’re evaluating the option of migrating our website, which currently runs on Kentico webforms, to Craft. Do you know of tools and services which make this easier than a re-build?
Eyal Ben Cohen's user avatar
1 vote
1 answer
55 views

Running plugin migrations when other plugin is installed?

I'm creating a plugin (A) that has optional support for another 3rd party plugin (B). When my plugin A is installed, I create a number of tables. If plugin B is also installed my migrations create ...
Timmy O'Mahony's user avatar
1 vote
1 answer
45 views

Migrating categories from Entry to Asset

Is it possible to migrate content like categories from an entry to an asset easily? Each entry has an image asset and I'd like to move all the categories on the entry to the asset. Would this require ...
evvvvritt's user avatar
2 votes
1 answer
101 views

Programatically setting dropdown options in a matrix

I'm building a Matrix field from within a module's migration. I can get all fields setup correctly except the options of either a Dropdown or Checkboxes field. $field = new \craft\fields\Matrix([ '...
dmatthams's user avatar
  • 2,502
2 votes
1 answer
38 views

Unavailable plugin during migration to craft 3

During a migration from craft 2 to craft 3, I stumble in 3 issues with plugins. Plugins are not available in craft 3. For example,"instablog" plugin Reinstall paid license plugins. Custom plugins. ...
Nelson Nguyen's user avatar
3 votes
2 answers
281 views

Migrate Craft CMS installation from PgSQL to MySQL - any hints?

We need to migrate a Craft installation with a pgsql dump to MySQL. Any hints on the procedure? Thanks, Matthias
Matthias Redl-Mann's user avatar
1 vote
1 answer
66 views

Assign a category group to a category field via migration

I am writing a plugin that sets up Craft in a particular way and have created a category field, but can't figure out how to assign a category group to the field, I have the following: protected ...
dmatthams's user avatar
  • 2,502