This process may take a long time depending on the size of your storage and your server's capacity.
Prior to initiating this process, you may want to check the number of files in the storage with the following command: ``tree -if -I index.html /path/to/storage/``.
Before transferring your database, you may want to clean it up; ensure the expiration of database items is set to a reasonable value and activated via the administrator panel.
*Admin* > *Site* > *Performance* > Enable "Clean up database"
To review the size of your database, log into MySQL with ``mysql -p`` run the following query:
````
SELECT table_schema AS "Database", SUM(data_length + index_length) / 1024 / 1024 / 1024 AS "Size (GB)" FROM information_schema.TABLES GROUP BY table_schema;
1. If you had set up a worker cron job like this ``*/10 * ** * cd /var/www/friendica; /usr/bin/php bin/worker.php`` run ``crontab -e`` and comment out this line. Alternatively if you deploy a worker daemon, disable this instead.
2. Put your server into maintenance mode: ``bin/console maintenance 1 "We are currently upgrading our system and will be back soon."``
Copy your old server's configuration file to ``config/local.config.php``.
Ensure the newly created database credentials are identical to the setting in the configuration file; otherwise update them accordingly.
### Cron job for worker
Set up the required daily cron job.
Run ``crontab -e`` and add the following line according to your system specification
``*/10 * ** * cd /var/www/friendica; /usr/bin/php bin/worker.php``
### DNS settings
Adjust your DNS records by pointing them to your new server.
## Troubleshooting
If you are unable to login to your newly migrated Friendica installation, check your web server's error and access logs and mysql logs for obvious issues.
If still unable to resolve the problem, it's likely an issue with your [installation](Install).
In this case, you may try to an entirely new Friendica installation on your new server, but use a different FQDN and DNS name.
Once you have this up and running, take it offline and purge the database and configuration file and try migrating to this installation.