This guide shows you how to import a .sql file into a PostgreSQL database using phpPgAdmin in cPanel. The process involves uploading your SQL file through the web interface, which then executes the queries against your selected database.

How to import the .sql file

  1. Step 1: Access phpPgAdmin

    Log in to your cPanel account and open the phpPgAdmin tool.

  2. Step 2: Connect to PostgreSQL server

    Click on the PostgreSQL link in the left tree menu and log in to the PostgreSQL server using your cPanel credentials.

  3. Step 3: Select your database

    Identify and select the database where you want to import data, then click on the SQL button.

  4. Step 4: Provide the SQL content

    Choose one of the two options:

    • (a) Paste the SQL queries directly into the provided field, or
    • (b) Upload a local file by clicking the Browse button to locate the .sql file on your computer.
  5. Step 5: Execute the import

    Click the Run button. The queries from your file will be uploaded and executed on your PostgreSQL database.