How to Install WordPress on Your Web Server Using FTP
In this article
Installing WordPress via FTP involves downloading the WordPress software, uploading it to your web hosting server, creating a database, and running the installation script. This method is useful when your host does not offer a one-click installer or when you need precise control over file placement.
What You'll Need
- FTP Client: Software such as FileZilla, Cyberduck, or WinSCP.
- FTP Credentials: Hostname (often your domain name or server IP), username, password, and port (usually 21).
- Database Details: You must be able to create a MySQL or MariaDB database and user via your hosting control panel (cPanel, Plesk, or similar).
- Text Editor: A plain text editor like Notepad, TextEdit (in plain text mode), or VS Code to edit the configuration file.
Step-by-Step
- Download WordPress. Go to the official WordPress.org download page. Click the "Download WordPress" button to get the latest zip archive. Save it to your computer.
- Extract the files. Locate the downloaded .zip file on your computer. Right-click and extract the contents. You will see a folder named "wordpress" containing the core files.
- Create a Database and User. Log in to your web hosting control panel. Find the "Databases" section and open MySQL Databases (or a similar tool). Create a new database, noting the name. Create a new MySQL user with a strong password. Add the user to the database and grant "All Privileges." Write down the database name, username, and password exactly as shown.
- Connect to Your Server via FTP. Open your FTP client. Enter your hostname, username, password, and port (usually 21). Click Quickconnect or Connect. Accept the server certificate if prompted.
- Upload the Files. On the server side (remote site), navigate to your website's root directory. This is often named
public_html,www, orhtdocs. On your computer side (local site), open the extracted "wordpress" folder. Select all the files inside it (wp-admin, wp-content, wp-includes, and .php files). Drag them or upload them to the root directory on the server. Do not upload the outer "wordpress" folder itself unless you want your site to live atyourdomain.com/wordpress. - Rename the Configuration File. Once the upload finishes, locate the file
wp-config-sample.phpin your server's root directory. Rename it towp-config.php. - Edit the Configuration File. Download the newly renamed
wp-config.phpto your computer. Open it in your text editor. Find the following lines:define( 'DB_NAME', 'database_name_here' ); define( 'DB_USER', 'username_here' ); define( 'DB_PASSWORD', 'password_here' );Replacedatabase_name_here,username_here, andpassword_herewith the details you created in Step 3. Save the file and upload it back to the server, overwriting the existing one. - Run the Installation Script. Open your web browser. Go to your domain name. If you uploaded files to the root, visit
yourdomain.com. If you uploaded to a subfolder, visityourdomain.com/subfolder. You should see the WordPress installation screen asking for language selection. - Complete the Setup. Select your language. Enter your site title, desired admin username, password, and email address. Click "Install WordPress." Log in to your new dashboard.
Common Mistakes
Uploading the wrong folder structure is the most frequent error. Users often upload the outer "wordpress" folder to the server, resulting in their site being located at yourdomain.com/wordpress instead of the root domain. Always open the folder and upload the contents inside.
Another common mistake is using incorrect database credentials. The database host is usually localhost, but some hosts require a specific internal hostname. Check your host's documentation if localhost fails.
Tips
Use a secure password for the admin account during setup. Avoid "admin" as a username, as it is a common target for brute-force attacks.
Before uploading, check if your server has a file manager or one-click installer in the control panel. Those methods are often faster than FTP and less prone to file transfer errors.
Keep your FTP client set to "Auto" mode so it correctly handles binary and ASCII files, though most modern clients handle this automatically.
Troubleshooting
If you see a blank white screen or a 500 Internal Server Error after uploading, check your file permissions. Directories should typically be set to 755, and files to 644.
If the browser prompts you to download a file instead of displaying the site, PHP may not be enabled or configured correctly on the server. Contact your hosting provider.
If you get an "Error establishing a database connection," verify your database name, username, and password in wp-config.php. Ensure the database user has full privileges assigned. If you are unsure of the database host value, try localhost first; if that fails, consult your hosting panel's database section for the correct MySQL hostname.
If you cannot connect via FTP, double-check that you are using the correct port (21 for standard FTP, or a custom port if specified by your host) and that your firewall is not blocking the connection.
Frequently Asked Questions
Do I need to create a database before installing WordPress?
Yes. WordPress requires a MySQL or MariaDB database to store your content. You must create this database and user manually before running the installation script.
Can I install WordPress without FTP?
Yes. Many hosts offer "one-click" installers (like Softaculous or Mojo Marketplace) through their control panel. You can also use SSH (command line) if you have terminal access.
Where do I find my FTP credentials?
Your FTP credentials are in your web hosting control panel. Look for an "FTP Accounts" section. You can often use your cPanel username and password, or create a specific FTP user.
What if I want WordPress in a subdirectory?
Upload the WordPress files to a specific folder inside your root directory (e.g., /blog). Your site will then be accessible at yourdomain.com/blog.
Why does my upload keep failing or disconnecting?
Large numbers of small files can time out. Try uploading in smaller batches or increasing the timeout setting in your FTP client. A unstable internet connection can also cause interruptions.