How to Upload a WordPress Website to Hostinger from Localhost
Export Your Local WordPress Database:
Go to phpMyAdmin on your local server.
Select your WordPress database.
Click on "Export" and save the SQL file.
Download Your WordPress Files:
Copy all files from your local WordPress directory (usually in htdocs or www).
Upload Files to Hostinger:
Log in to your Hostinger account.
Open the File Manager or use FTP to upload your WordPress files to the public_html directory.
Create a Database on Hostinger:
Go to the Hostinger control panel.
Navigate to "Databases" and create a new MySQL database.
Note the database name, username, and password.
Import the Database:
Open phpMyAdmin in Hostinger.
Select your new database and click "Import".
Upload the SQL file exported from your local server.
Update wp-config.php:
In the File Manager, locate the wp-config.php file.
Update the database name, username, and password to match the new database details.
Adjust Site URL:
In phpMyAdmin, navigate to the wp_options table.
Update the siteurl and home fields to reflect your new domain.
Final Checks:
Ensure all files are uploaded correctly.
Visit your website to check if it’s functioning properly.
Your WordPress site should now be live on Hostinger!
29 сен 2024