How to manually install WordPress

To migrate a WordPress website to a new server, follow these general steps:

  1. Set Up the New Server

    Before migrating your WordPress website, the first and most crucial step is to properly set up your new server environment. This involves selecting a reliable hosting provider and ensuring the server is fully prepared to run WordPress smoothly.

    a. Choose a Hosting Provider

    Start by selecting a new hosting provider based on your website’s needs. Consider factors such as:

    • Performance and speed (SSD storage, caching support)

    • Server location (closer to your audience = faster load times)

    • Scalability (if you expect traffic growth)

    • Customer support

    • Security features

    • Price and reliability (uptime guarantees)

    Popular WordPress-friendly hosting options include shared hosting, VPS (Virtual Private Server), cloud hosting (e.g., DigitalOcean, AWS, or Google Cloud), and managed WordPress hosting providers (e.g., Kinsta, WP Engine, SiteGround).

    b. Choose the Right Server Stack

    Make sure your new hosting environment supports:

    • PHP (version 7.4 or higher recommended)

    • MySQL or MariaDB (for database support)

    • Apache or Nginx (web servers commonly used for WordPress)

    • cPanel or any other control panel (for ease of use, optional but helpful)

    Most hosting providers will already have this configured, especially if they advertise WordPress compatibility.

    c. Install a Fresh WordPress Copy

    Once the server is ready:

    • Use your hosting control panel or an auto-installer like Softaculous, Fantastico, or Installatron to install WordPress.

    • Alternatively, download the latest version of WordPress from wordpress.org and manually upload it to your server via FTP or the control panel file manager.

    ⚠️ Note: This WordPress installation is temporary. It will be replaced later with your migrated site’s files and database, but it’s important to verify that everything works properly first.

    d. Verify the Installation Works

    Before moving your site files:

    • Visit your domain or temporary URL provided by your host to ensure the WordPress install loads correctly.

    • This confirms that your server has all the necessary components and permissions in place.

  2. Backup Your WordPress Website

    Creating a complete backup of your existing WordPress website is a critical step before starting the migration. This ensures you have a full copy of your site that can be restored if anything goes wrong during the move. The backup includes both your site’s files and its database.

    a. Backup WordPress Files

    Your website files include:

    • Core WordPress files

    • Themes and plugins

    • Media uploads (images, PDFs, etc. stored in /wp-content/uploads)

    • Custom code or configuration files like .htaccess, wp-config.php

    To back up your files:

    • Use an FTP client like FileZilla or WinSCP to connect to your current server. You’ll need your FTP credentials (host, username, password, port).

    • Navigate to the root directory of your WordPress site. This is often public_html, htdocs, or a subfolder like /blog.

    • Download all files and folders to a safe location on your local computer. This process may take time depending on the size of your site.

    Alternatively, if your hosting provider offers a File Manager through cPanel or another control panel, you can:

    • Select all files in the site’s root directory.

    • Compress them into a single ZIP archive.

    • Download the ZIP file to your computer.

    b. Export the WordPress Database

    The WordPress database stores:

    • All posts and pages

    • Website settings and configurations

    • User accounts

    • Plugin and theme settings

    • Comments, categories, and tags

    To export the database:

    1. Log into your hosting control panel (e.g., cPanel).

    2. Open phpMyAdmin under the “Databases” section.

    3. In the left sidebar, select the correct WordPress database. If you’re unsure of the name, you can find it in your wp-config.php file (DB_NAME).

    4. Click the Export tab at the top.

    5. Choose the Quick export method and set format to SQL.

    6. Click Go to download the .sql file to your computer.

    ✅ Tip: If your database is large, use the Custom export method to exclude logs or unnecessary tables, or consider using a plugin like WP Migrate DB for advanced options.

    Once you’ve backed up both your files and database, you’re ready to start building your site on the new server.

  3. Create a New Database on the New Server

    Now that you have backed up your WordPress site files and exported the database from the old server, the next step is to prepare a new, empty MySQL database on your new server. This is where you’ll later import your old site’s data.

    a. Access Your Hosting Control Panel

    Most web hosting providers offer a control panel like cPanel, Plesk, or a custom dashboard. Once logged in:

    • Look for a section called Databases, MySQL Databases, or similar.

    • Click on it to manage and create new databases.

    b. Create a New Database

    Follow these steps to create a fresh database:

    1. Enter a name for the new database. Keep it relevant, like wp_mysite or something easy to identify.

    2. Click Create Database.

    ⚠️ Some hosts automatically prepend a username to the database name (e.g., user_wp_mysite). Make a note of the full name.

    c. Create a Database User

    Next, you need to create a user who can access and manage this new database:

    1. Choose a username and a strong password.

    2. Click Create User.

    🔒 Use a secure password generator to avoid weak credentials that could be exploited.

    d. Assign the User to the Database

    After creating the user:

    1. Assign them to the newly created database.

    2. Grant All Privileges so the user has full access to perform operations like importing data, running queries, etc.

    3. Save the changes.

    e. Note Down Database Credentials

    You will need the following details in the upcoming steps:

    • Database name

    • Database username

    • User password

    • Database host (usually localhost, but some hosts like Cloudways, Kinsta, or external DB providers may have a different hostname)

    💡 Tip: Store these details temporarily in a secure note or document. You’ll enter them into the wp-config.php file when configuring WordPress on the new server.

    Once your new database is ready, you can proceed to upload the WordPress files and import your old site’s content.

  4. Upload WordPress Files to the New Server

    After preparing the new server and creating a new database, the next step is to transfer your WordPress site files from your local backup (created in Step 2) to the new server. These files include your theme, plugins, media, and WordPress core files.

    a. Connect to the New Server via FTP or File Manager

    There are two primary methods to upload your site files:

    Option 1: Using an FTP Client (Recommended for Full Control)

    1. Open your preferred FTP client (like FileZilla, Cyberduck, or WinSCP).

    2. Enter your new hosting server’s FTP credentials:

      • Host (e.g., ftp.yourdomain.com or server IP)

      • Username and password

      • Port (usually 21 for FTP or 22 for SFTP)

    3. Once connected, navigate to the root directory where WordPress should be installed. This is usually:

      • /public_html or /www for the primary domain

      • A subdirectory like /blog or /yourdomain.com for add-on domains

    Option 2: Using the Hosting File Manager

    1. Log in to your hosting control panel (e.g., cPanel).

    2. Open the File Manager tool.

    3. Navigate to the target directory (typically public_html).

    4. Use the Upload option to upload the site files.

    b. Upload the WordPress Files

    • If you downloaded the files individually during the backup step, now upload all of them (including hidden files like .htaccess if available).

    • If you backed up your site as a .zip archive, upload the ZIP file, then extract it directly on the server using the file manager’s extract feature (faster and more efficient).

    Ensure the folder structure is preserved during the upload:

    bash
    /wp-admin /wp-content /wp-includes index.php wp-config.php …

    c. Replace Default Files if Needed

    If you previously installed a fresh WordPress version on the new server (Step 1), you can overwrite those files with your real site files. Just make sure to not delete or overwrite your new wp-config.php file yet, as you’ll modify it in the next step.

    ⚠️ Be cautious not to leave files incomplete during upload. A missing or partial upload may break the website or cause errors later.

    d. Confirm Upload Success

    After the upload:

    • Refresh the directory in your FTP client or file manager.

    • Ensure all key folders and files are present, especially the wp-content folder (which contains your theme, plugins, and uploads).

    • If you uploaded a ZIP file, confirm it was successfully extracted and nothing is missing.

    With all your site files now transferred to the new server, the next step is to import your database into the new MySQL database you created earlier.

  5. Import the Database:
    • Access your new hosting control panel and locate the database management tool (usually phpMyAdmin).
    • Import the SQL file you exported from the old server into the new database you created.
  6. Update the wp-config.php File:
    • In the WordPress files on the new server, locate the wp-config.php file.
    • Edit the file and update the database name, username, password, and database host to match the details of the new server.
  7. Replace URLs (optional):
    • If your domain name or URL structure has changed, you may need to update the URLs within your WordPress database.
    • You can use a search and replace tool or a plugin like Velvet Blues Update URLs to replace old URLs with the new ones.
  8. Update DNS and Test:
    • Update the DNS settings for your domain to point to the new server.
    • Wait for the DNS propagation to complete.
    • Access your WordPress site using the new domain and test its functionality to ensure everything is working as expected.

It’s important to note that the specific steps may vary depending on your hosting provider and server configuration. If you’re not comfortable performing the migration yourself, consider consulting your hosting provider or hiring a professional WordPress developer to assist you with the process. Additionally, always make sure to have a backup of your WordPress files and database before making any changes.