FB pixel

How to upload a database to hosting

3 15.08.2025

Before starting, ensure you have a database backup in .sql or .sql.gz format. This file is created during export from the previous hosting or a local server. You will also need the credentials to access your hosting control panel: login, password, database username, server address, and database name. It is important to create an empty database in advance via the "Databases" section in the ISPmanager panel so you can import the content afterward.

Uploading the database via phpMyAdmin

If the file size does not exceed the limit (usually up to 50–100 MB), using the phpMyAdmin web interface is convenient. Log into your hosting panel, open phpMyAdmin, select the target database, and go to the "Import" tab. Click the file selection button, choose the required .sql file, select the correct format (SQL by default), and start the import. Once completed, you will see a success message. If errors occur, check the encoding or make sure the database is empty.

Uploading the database via SSH

If the file is too large, use SSH connection. To do this, log in to the server using the command:

ssh user@server_address

Then upload the .sql file to the server using scp or sftp. Import is performed with the command:

mysql -u username -p database_name < path_to_file.sql

The system will ask for the database password. This method allows handling large data volumes without timeout risks.

Finishing and verification

After upload, it is recommended to open the database in phpMyAdmin and ensure all tables are present and the structure and data match expectations. You should also test the site connection and make sure pages that use the data are displayed correctly. Regular checks after the import help prevent issues with site operation and avoid data loss.

Learn more about how to purchase a domain, hosting, VPS, or dedicated server.

FAQ

What access privileges are required to upload a database?

To upload a database, you need privileges to create and modify tables and import data. Typically, these are CREATE, INSERT, UPDATE, and DELETE privileges.

How to configure database connection parameters?

Connection parameters include the hostname, database name, username, and password. These parameters are specified in the application configuration file or through the management interface.

How to optimize the database after uploading?

After uploading the database, it is recommended to create indexes for frequently used fields, optimize queries, and set up caching. This will improve performance and speed.