I tried importing wp database through shell command but it is in the postgre.sql format. But I want my wp data is in the sql format How to resolve this issue

Hi, I found an article to import the database manually through server commands. I am using Digital Ocean.

I used the ‘shell’ command as suggested.

Following is the command process I followed.

ee shell example.com

wp db export databasename.sql

Data is imported but it is in the postgre.sql format. why it is in the postgre.sql not in the
.sql format. The file icon is an elephant head.

I have to upload this data to a new droplet server. I tried but PHPMyAdmin and the adminer do not accept this format.

can anybody suggest how to import data in sql format itself?

If anyone in the forum can help me out to resolve this issue.

Plz, reply as fast as you can.

the WP-CLI always exports to a standardized text file. I have never had issues importing those files. I do use the same mechanism to import the database into the new server. That is ee shell back into your site and then wp db import dbname.sql to get it loaded. You have to make sure you move the file to the htdocs director for the site first and also make sure that owner/perms are such that the shell user, normally www-data, can access the file. Remember to delete that file out of your public folder when done.

As to why you see the icon on your computer, that most likely has to do with your individual computer settings defining which app opens the extension.

EDIT: I am adding the following for clarity.

Original Server

sudo ee shell mysite.com
wp db export mysitedb.sql

Then move or copy the sql file from the htdocs folder of the origin site, normally /opt/easyengine/sites/mysite.com/app/htdocs to your new server. You can use Filezilla, rsync, rcp or other methods to move the file.

New Server:
Move the file into the htdocs folder for the site. Normally in /opt/easyengine/sites/mysite.com/app/htdocs folder.

chown www-data:www-data mysitedb.sql
wp db import mysitedb.sql
rm mysitedb.sql

if you wish to use the phpMyAdmin that is part of the admin tools, follow this guide

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.