---
title: "View source for Upgrading Migrating Dreamfactory - DreamFactory Wiki"
source: "http://wiki.dreamfactory.com/index.php?action=edit&title=Upgrading_Migrating_Dreamfactory"
canonical_url: "http://wiki.dreamfactory.com/index.php?action=edit&title=Upgrading_Migrating_Dreamfactory"
converted_at: "2026-10-22T18:52:15.288Z"
format: "markdown"
converted_by: "html-to-md-ai"
---
[]()
	
	
	
	# View source for Upgrading Migrating Dreamfactory

	
		
		← [Upgrading Migrating Dreamfactory](/Upgrading_Migrating_Dreamfactory)
		
		
		
		[Jump to navigation](#mw-head)
		[Jump to search](#searchInput)
		You do not have permission to edit this page, for the following reason:

The action you have requested is limited to users in the group: [Users](/index.php?title=DreamFactory_Wiki:Users&action=edit&redlink=1).---

You can view and copy the source of this page.

{{#seo:
|title=Upgrading Migrating Dreamfactory - DreamFactory Documentation
|title_mode=replace
|canonical=https://wiki.dreamfactory.com/Upgrading_Migrating_Dreamfactory
|og:title=Upgrading Migrating Dreamfactory
|og:type=article
|og:site_name=DreamFactory Documentation
}}

&lt;span id="upgrading-and-migrating-dreamfactory">&lt;/span>
= Upgrading and Migrating DreamFactory =

This guide covers two different scenarios for updating your DreamFactory installation:

* '''Minor Version Upgrades''': In-place updates for patch releases and minor versions (e.g., 7.0.0 → 7.1.0)
* '''Major Version Migration''': Complete migration to a new server or environment, typically for major version changes or infrastructure updates

Choose the appropriate section based on your needs. Most users will use the minor version upgrade process for routine updates.

-----

&lt;span id="minor-version-upgrades">&lt;/span>
= Minor Version Upgrades =

For minor version upgrades and patch releases, you can perform an in-place upgrade of your existing DreamFactory installation. This process uses Git, Composer, and Laravel's Artisan commands to update your current environment.

&lt;span id="prerequisites">&lt;/span>
== Prerequisites ==

* '''Backup Required''': Always perform complete backups before upgrading
* '''Git Repository''': Your DreamFactory installation must be a Git repository
* '''Command Line Access''': Shell/SSH access to your server
* '''Permissions''': Proper file permissions on storage and cache directories

&lt;span id="upgrade-process">&lt;/span>
== Upgrade Process ==

&lt;span id="step-1-create-backups">&lt;/span>
=== Step 1: Create Backups ===

Navigate to one level above your DreamFactory directory (typically &lt;code>/opt/dreamfactory&lt;/code>) and create a file backup:

&lt;syntaxhighlight lang="bash">cd /opt
cp -r dreamfactory dreamfactory.backup&lt;/syntaxhighlight>
Create a database backup, reference for methods found [[#step-2-back-up-the-system-database|here]].

&lt;span id="step-2-prepare-for-upgrade">&lt;/span>
=== Step 2: Prepare for Upgrade ===

Navigate to your DreamFactory installation directory:

&lt;syntaxhighlight lang="bash">cd /opt/dreamfactory&lt;/syntaxhighlight>
Stash any local changes to preserve modifications:

&lt;syntaxhighlight lang="bash">git stash&lt;/syntaxhighlight>
&lt;span id="step-3-update-source-code">&lt;/span>
=== Step 3: Update Source Code ===

Switch to the master branch:

&lt;syntaxhighlight lang="bash">git checkout master&lt;/syntaxhighlight>
Pull the latest version:

&lt;syntaxhighlight lang="bash">git pull origin master&lt;/syntaxhighlight>
&lt;span id="step-4-update-dependencies-and-permissions">&lt;/span>
=== Step 4: Update Dependencies and Permissions ===

Set proper permissions on cache directories. Replace &lt;code>{web-service-user}&lt;/code> with your web server user (e.g., &lt;code>www-data&lt;/code>, &lt;code>dreamfactory&lt;/code>) and &lt;code>{your-user-group}&lt;/code> with your user group:

&lt;syntaxhighlight lang="bash">sudo chown -R {web-service-user}:{your-user-group} storage/ bootstrap/cache/&lt;/syntaxhighlight>
''e.g., &lt;code>sudo chown -R dreamfactory:dreamfactory storage/ bootstrap/cache/&lt;/code>''

&lt;syntaxhighlight lang="bash">sudo chmod -R 2775 storage/ bootstrap/cache/&lt;/syntaxhighlight>
Update Composer dependencies:

&lt;syntaxhighlight lang="bash">composer install --no-dev --ignore-platform-reqs&lt;/syntaxhighlight>
Run database migrations:

&lt;syntaxhighlight lang="bash">php artisan migrate --seed&lt;/syntaxhighlight>
Clear application cache and config:

&lt;syntaxhighlight lang="bash">php artisan cache:clear&lt;/syntaxhighlight>
&lt;syntaxhighlight lang="bash">php artisan config:clear&lt;/syntaxhighlight>
&lt;span id="step-5-restart-web-server">&lt;/span>
=== Step 5: Restart Web Server ===

For Nginx (DreamFactory default)

&lt;syntaxhighlight lang="bash">sudo systemctl restart nginx&lt;/syntaxhighlight>
For Apache:

&lt;syntaxhighlight lang="bash">sudo systemctl restart apache2&lt;/syntaxhighlight>
&lt;span id="troubleshooting">&lt;/span>
== Troubleshooting ==

&lt;span id="composer-install-errors">&lt;/span>
=== Composer Install Errors ===

Clear Composer cache:

&lt;syntaxhighlight lang="bash">composer clear-cache&lt;/syntaxhighlight>
Remove vendor directory and reinstall:

&lt;syntaxhighlight lang="bash">rm -rf vendor/&lt;/syntaxhighlight>
&lt;syntaxhighlight lang="bash">composer install --no-dev --ignore-platform-reqs&lt;/syntaxhighlight>
&lt;span id="permission-issues">&lt;/span>
=== Permission Issues ===

Reset permissions on critical directories:

&lt;syntaxhighlight lang="bash">sudo chown -R {web-service-user}:{your-user-group} storage/ bootstrap/cache/&lt;/syntaxhighlight>
''e.g., &lt;code>sudo chown -R dreamfactory:dreamfactory storage/ bootstrap/cache/&lt;/code>''

&lt;syntaxhighlight lang="bash">sudo chmod -R 2775 storage/ bootstrap/cache/&lt;/syntaxhighlight>
&lt;span id="migration-command-not-found">&lt;/span>
=== Migration Command Not Found ===

Clear compiled cache files:

&lt;syntaxhighlight lang="bash">rm -rf bootstrap/cache/compiled.php storage/framework/cache/*&lt;/syntaxhighlight>
Retry the composer install:

&lt;syntaxhighlight lang="bash">composer install --no-dev --ignore-platform-reqs&lt;/syntaxhighlight>
&lt;span id="verification">&lt;/span>
== Verification ==

After completing the upgrade:

# '''Check DreamFactory version''' in the admin interface
# '''Test your APIs''' to ensure they're functioning correctly&lt;br />

# '''Verify user access''' and permissions are intact
# '''Check system logs''' for any errors

-----

&lt;span id="major-version-migration">&lt;/span>
= Major Version Migration =

For major version changes or when migrating to a new server/environment, you'll need to migrate your DreamFactory instance completely. This process focuses on transferring two critical components: the &lt;code>.env&lt;/code> file and the DreamFactory system database.

&lt;span id="why-these-components-matter">&lt;/span>
== Why These Components Matter ==

&lt;span id="env-file">&lt;/span>
=== &lt;code>.env&lt;/code> File ===

Contains essential configuration settings including: - The APP_KEY (critical for data encryption) - Database credentials - Caching preferences - API keys - Environmental settings

&lt;span id="dreamfactory-system-database">&lt;/span>
=== DreamFactory System Database ===

Stores all your configuration data: - User accounts - Scripts&lt;br />
- API configurations - System-level metadata

Migrating these components ensures your new instance contains all original configurations, eliminating manual recreation.

&lt;span id="file-transfer-reference">&lt;/span>
== File Transfer Reference ==

:::info[CLI File Transfer Methods by Deployment Type] &lt;Tabs> &lt;TabItem value="vm/linux" label="VM/Linux">&lt;br />
'''FROM remote TO local''' &lt;code>bash     scp &amp;lt;user&amp;gt;@&amp;lt;remote-server&amp;gt;:/path/to/file local-destination/&lt;/code> Example: &lt;code>scp root@192.168.1.100:/opt/dreamfactory/.env .&lt;/code>

&lt;pre>**FROM local TO remote**
&lt;syntaxhighlight lang="bash">
scp local-source &amp;lt;user&amp;gt;@&amp;lt;remote-server&amp;gt;:/path/to/destination/
&lt;/syntaxhighlight>
Example: `scp dump.sql root@192.168.1.100:/opt/dreamfactory/`&lt;/pre>
&lt;/TabItem> &lt;TabItem value="docker" label="Docker"> '''FROM container TO local''' &lt;code>bash     docker cp &amp;lt;container_name_or_id&amp;gt;:/path/to/file local-destination/&lt;/code> Example: &lt;code>docker cp df-docker-web-1:/opt/dreamfactory/.env .&lt;/code>

&lt;pre>**FROM local TO container**
&lt;syntaxhighlight lang="bash">
docker cp local-source &amp;lt;container_name_or_id&amp;gt;:/path/to/destination/
&lt;/syntaxhighlight>
Example: `docker cp dump.sql df-docker-web-1:/opt/dreamfactory/`&lt;/pre>
&lt;/TabItem> &lt;TabItem value="kubernetes" label="Kubernetes"> '''FROM pod TO local''' &lt;code>bash     kubectl cp &amp;lt;namespace&amp;gt;/&amp;lt;pod-name&amp;gt;:/path/to/file local-destination/&lt;/code> Example: &lt;code>kubectl cp df-namespace/df-pod:/opt/dreamfactory/.env .&lt;/code>

&lt;pre>**FROM local TO pod**
&lt;syntaxhighlight lang="bash">
kubectl cp local-source &amp;lt;namespace&amp;gt;/&amp;lt;pod-name&amp;gt;:/path/to/destination/
&lt;/syntaxhighlight>
Example: `kubectl cp dump.sql df-namespace/df-pod:/opt/dreamfactory/`&lt;/pre>
&lt;/TabItem> &lt;/Tabs> :::

&lt;span id="migration-process">&lt;/span>
== Migration Process ==

&lt;span id="step-1-back-up-the-.env-file">&lt;/span>
=== Step 1: Back Up the .env File ===

Navigate to the DreamFactory root directory:

&lt;syntaxhighlight lang="bash">cd /opt/dreamfactory&lt;/syntaxhighlight>
Copy the &lt;code>.env&lt;/code> file to your local machine (see [[#file-transfer-reference|File Transfer Reference]] for deployment-specific commands):

&lt;syntaxhighlight lang="bash">scp &lt;user>@&lt;remote-server>:/opt/dreamfactory/.env .&lt;/syntaxhighlight>
'''Tip:''' Store the &lt;code>.env&lt;/code> file in a secure location to recover from any migration issues.

&lt;span id="step-2-back-up-the-system-database">&lt;/span>
=== Step 2: Back Up the System Database ===

Use the system database credentials from the &lt;code>.env&lt;/code> file to create a backup:

:::info[Backup Methods by Database Type] &lt;Tabs> &lt;TabItem value="mysql" label="MySQL"> &lt;code>bash     mysqldump -u root -p --databases dreamfactory --no-create-db &amp;gt; dump.sql&lt;/code> &lt;/TabItem> &lt;TabItem value="sqlserver" label="MS SQL Server">&lt;br />
Use SSMS (SQL Server Management Studio) to export the database to a file. &lt;/TabItem> &lt;TabItem value="postgresql" label="PostgreSQL"> &lt;code>bash     pg_dump -U root -d dreamfactory -F p &amp;gt; dump.sql&lt;/code> &lt;/TabItem> &lt;TabItem value="sqlite" label="SQLite"> &lt;code>bash     sqlite3 dreamfactory.db &amp;quot;.dump&amp;quot; &amp;gt; dump.sql&lt;/code> &lt;/TabItem> &lt;/Tabs> :::

Replace &lt;code>root&lt;/code> with your database user and &lt;code>dreamfactory&lt;/code> with your database name if different.

Transfer the backup file to a secure external location:

&lt;syntaxhighlight lang="bash">scp &lt;user>@&lt;remote-server>:/opt/dreamfactory/dump.sql .&lt;/syntaxhighlight>
&lt;span id="step-3-prepare-the-new-dreamfactory-instance">&lt;/span>
=== Step 3: Prepare the New DreamFactory Instance ===

# Set up a new server with a clean operating system installation
# Follow the [[Getting_Started/Installing_Dreamfactory|DreamFactory installation guide]] for your platform
# Complete the initial setup by creating an administrator account (this will be replaced with migrated data)

&lt;span id="step-4-additional-configuration">&lt;/span>
=== Step 4: Additional Configuration ===

&lt;span id="mysql-specific-configuration">&lt;/span>
==== MySQL Specific Configuration ====

If upgrading MySQL versions (e.g., 5.6 to 5.7+), you may need to disable strict mode by opening &lt;code>config/database.php&lt;/code> and adding &lt;code>'strict' =&amp;gt; false&lt;/code> under the MySQL configuration section.

&lt;span id="general-configuration">&lt;/span>
==== General Configuration ====

Ensure all system dependencies are up to date. DreamFactory supports PHP 8.1 or later.

&lt;span id="step-5-import-the-system-database">&lt;/span>
=== Step 5: Import the System Database ===

Transfer the &lt;code>dump.sql&lt;/code> file to the new server:

&lt;syntaxhighlight lang="bash">scp dump.sql &lt;user>@&lt;new-server>:/opt/dreamfactory/&lt;/syntaxhighlight>
Clear the default database schema:

&lt;syntaxhighlight lang="bash">php artisan migrate:fresh&lt;/syntaxhighlight>
&lt;syntaxhighlight lang="bash">php artisan migrate:reset&lt;/syntaxhighlight>
Import the database backup:

:::info[Import Methods by Database Type] &lt;Tabs> &lt;TabItem value="mysql" label="MySQL"> &lt;code>bash     mysql -u root -p dreamfactory &amp;lt; dump.sql&lt;/code> &lt;/TabItem> &lt;TabItem value="sqlserver" label="MS SQL Server">&lt;br />
Use SSMS (SQL Server Management Studio) to import the database from the file. &lt;/TabItem> &lt;TabItem value="postgresql" label="PostgreSQL"> &lt;code>bash     psql -U root -d dreamfactory &amp;lt; dump.sql&lt;/code> &lt;/TabItem> &lt;TabItem value="sqlite" label="SQLite"> &lt;code>bash     sqlite3 dreamfactory.db &amp;lt; dump.sql&lt;/code> &lt;/TabItem> &lt;/Tabs> :::

Run database migrations to apply schema updates:

&lt;syntaxhighlight lang="bash">php artisan migrate --seed&lt;/syntaxhighlight>
Edit the &lt;code>.env&lt;/code> file and replace the APP_KEY with the value from your old instance:

&lt;syntaxhighlight lang="bash">
APP_KEY=YOUR_OLD_APP_KEY_VALUE
&lt;/syntaxhighlight>
Clear caches to finalize the configuration:

&lt;syntaxhighlight lang="bash">php artisan cache:clear&lt;/syntaxhighlight>
&lt;syntaxhighlight lang="bash">php artisan config:clear&lt;/syntaxhighlight>
&lt;span id="migration-verification">&lt;/span>
== Migration Verification ==

Log in to the new DreamFactory instance using credentials from the migrated environment. Verify that:

# '''All user accounts''' are present and accessible
# '''API configurations''' are intact
# '''Scripts and custom logic''' are functioning
# '''Database connections''' work properly
# '''System settings''' match your original configuration

'''Congratulations!''' Your DreamFactory instance has been successfully migrated.

== See also ==
* [[Upgrading_Php_Windows|Upgrading PHP On Windows]]
* [[Upgrading_Php|Upgrading PHP]]

[[Category:Upgrades]]
[[Category:Upgrading]]
[[Category:Migrating]]

[[Category:Upgrades]]
Return to [Upgrading Migrating Dreamfactory](/Upgrading_Migrating_Dreamfactory).

Retrieved from "[https://wiki.dreamfactory.com/Upgrading_Migrating_Dreamfactory](https://wiki.dreamfactory.com/Upgrading_Migrating_Dreamfactory)"