Migration from WP Plugin to On Premise - For dummies please

I want to migrate all my data from Matomo for WordPress to Matomo On-Premise.

Found this: https://matomo.org/faq/wordpress/how-do-i-migrate-all-my-data-from-matomo-for-wordpress-to-matomo-on-premise/

Installed the migration plugin on my wp site.

I feel stupid but I simply don’t understand where to run the command. Or how. Is it done via Mysql or ftp file upload.

Can someone please explain it in simple terms.

The wp site is on shared hosting and the on premise install is up and running on another server. I have all the credentials for the target database.

Ok. Activated SSH on source and connected via terminal on mac.

Using the example command:

php wp-content/plugins/matomo/app/console migration:measurable --source-idsite=1  --target-db-host=192.168.1.1 --target-db-username=root --target-db-password=secure --target-db-name=matomo2

Obviously with my db credentials.

Terminal answers:

Could not open input file: wp-content/plugins/matomo/app/console

Is the path wrong? How do I write it properly?

@innocraft, do you have some hints for Rickard?

There has been some progress here.

I’m past the “could not open file” error. It was a directory/path issue.

Still not manage do to the migration though. Now there seems to be a connection issue between source and target server. I’ve tested a lot of things. Both source and target says everything is open and should be working. Still it doesn’t. It’s a blame-game and I’m stuck in the middle.

Source support says target is blocking the request. Target support says source isn’t even calling them…

Is there some command to run which can tell who is blocking who?

Can you just test a CURL from the source to the target and check if the request arrives?
Maybe there is some firewall in between that prevent the connection…

Following this with some interest to see what happens. Had he same question a while ago, with not very good answers, and I have not got around to do this yet…

I’m not very familiar with command line so I’m not completely sure how to test a CURL.

I did run this on source server:
mysql -u %target_username% -h %target_host% -P %target_port% -p -D %target_database%

After entering the password I received this result:
ERROR 2003 (HY000): Can’t connect to MySQL server on ‘mysql6.ilait.se:3306’ (110)

I have checked https://portchecker.co/check to confirm that target host port is OPEN.

Hi @rickard can you please contact our support team on shop@matomo.org to discuss this further, and provide us all details on the issues you are experiencing.