How to Migrating Wordpress Site to Shared Hosting

Hi I got some problem to migrating my Wordpress site that installed using Easy Engine 4 and Sqlite as databases… I need to migrate it to Shared Hosting… can some body tell how to migrating all the file also the databases so its can be used on phpmyadmin on shared hosting which is used sql

drwxr-xr-x 2 root root 4.0K Feb 23 19:09 Desktop
drwxr-xr-x 2 root root 4.0K Feb 23 19:09 Documents
drwxr-xr-x 2 root root 4.0K Feb 23 19:09 Downloads
drwxr-xr-x 2 root root 4.0K Feb 23 19:09 Music
drwxr-xr-x 2 root root 4.0K Feb 23 19:09 Pictures
drwxr-xr-x 2 root root 4.0K Feb 23 19:09 Public
drwxr-xr-x 2 root root 4.0K Feb 23 19:09 Templates
drwxr-xr-x 2 root root 4.0K Feb 23 19:09 Videos
-rw-r--r-- 1 root root  13K Apr  9  2019
-rw-r--r-- 1 root root 1.5K Jun  3  2019 ee
-rw-r--r-- 1 root root    0 Feb 21 07:23 ee.sqlite
-rw-r--r-- 1 root root    0 Feb 23 18:59 main
-rw-r--r-- 1 root root    0 Feb 23 20:26 main:
-rw-r--r-- 1 root root    0 Feb 23 17:48
-rw-r--r-- 1 root root 1.1K Jun  3  2019 taruhaneuro2020.csr
-rw------- 1 root root 1.7K Jun  3  2019 taruhaneuro2020.key

which one was my database, and how I export it

I always recommend that unless you are completely comfortable on the command-line that you just migrate sites the “Wordpress” way. There are no shortage of both free and commercial plugins that will move all your sites files and databases from one server to another as well as prep the new database so it works properly. I have used WPvivid Backup, Duplicator and others.

But if you want to grab the SQL from the command-line I recommend you use the wp-cli tool to get the latest. It takes all the drudgery out of the mysqldump command. First you need to get shell access to your site. With easyengine that is as simple as typing

 sudo ee shell 

Once in your shell for your site, make sure you are in your htdocs folder first then type

wp db export 

The database dump will be in that same folder. I would IMMEDIATELY move it out of that directory and place it elsewhere for further action. Then an easy rsync/scp/sftp to your new site and you can reverse the process to get the database imported.

The exported file is compatible with PhpMyAdmin (PMA) and should import with ease unless it exceeds the size limitations of PMA. If you get an error indicating as such then you will have to import to your new site using the wp-cli command-line method.

thx for your help, already trying to install wp-cli, move to my wordpress htdocs and run wb db export using root user, but Im getting this error

mysqldump: Got error: 2005: Unknown MySQL server host 'global-db' (11) when trying to connect

wp-cli should have already been present on a stock EasyEngine install. You should not have to install it.

Is the site up and running?? If not, then getting the site up, or at least getting the db server running is the first priority.

Judging by that error, it does look like the dump utility is attempting to connect to the database and failing. That is a bit troubling. I would start there. Make sure that the database server is running.

sudo ee service restart db

then a quick check at docker ps should let indicate whether the db container is running. As long as it is running you should be able to use the wp db export command successfully.

If the db container is not running, or continues to fail to connect, then ping me and we can discuss further troubleshooting.

If the site is running, I do suggest that you look into the various migration plugins as they can save tons of time. I use them all the time and I feel completely versed in EasyEngine, Docker and wp-cli. it is sometimes just easier to use the tools as the developers have intended than to hack away at the command line. My two cents.

already trying to sude ee service restart db

do docker ps and showing like this

still getting

mysqldump: Got error: 2005: Unknown MySQL server host 'global-db' (11) when trying to connect

Try docker ps several times over the course of about 15 minutes. What you want to see is that the status shows some uptime/stability. Sometimes containers restart every few minutes and that shows in the status if you never see it higher than a short time frame. In the pic you posted, the db server has only 4 minutes of uptime, compared to the rest of the containers at 2 days. Most likely because you restarted it, but it could be cycling as well.

And is the site actually up and live? Or is the site NOT up at all?

yes the problem was digital ocean maybe shutdown my droplet because some isue… Ill try to ask them about it

IF site not up did I can’t download the database?