How to install WordPress as fast as possible

This guide intends to walk you through every step of a WordPress install. It was designed with NearlyFreeSpeech.NET hosting in mind, but may be helpful on other hosts as well.

Want an even faster way of installing WordPress? You can try the steps here if your server already has the wp cli installed. (You can run wp --info to see if your server has the wp cli.)

  1. Use PuTTY to SSH into the server where you wish to install WordPress.
  2. Run
    wget https://wordpress.org/latest.tar.gz && tar -xzvf latest.tar.gz

    To get the latest install files for WordPress and unzip the wordpress folder.

  3. Run
    rm latest.tar.gz

    To delete the zipped folder.

  4. Run
    cp -rp wordpress/* /home/684888.cloudwaysapps.com/bexgrkkbeu/public_html/

    To copy the contents of the unzipped WordPress directory to the root directory of your server. You might have to use a path different than "/home/684888.cloudwaysapps.com/bexgrkkbeu/public_html/" depending on your particular server.

  5. Run
    rm -r wordpress

    To delete the unzipped WordPress directory.

  6. Log into  phpMyAdmin (or equivalent UI for your server’s MySQL Database).
  7. Click on “Databases”.
  8. Create a new database by providing a database name like “sitenamewp”, then clicking “Create”. WordPress recommends using “utf8mb4_general_ci” collation when creating a database. Write the database name down–it will be required later.
  9. Return to the main page by clicking phpMyAdmin logo in the top left.
  10. Click “User Accounts”
  11. Click “Add user account”
  12. Give the user a name like “wpuser_sitename” Write the user name down–it will be required later.
  13. Generate a password for the user by clicking the “Generate” button. Write the password down–it will be required later.
  14. Click “Go” to create the user.
  15. Go back to “User accounts”, then click “Edit privileges” for the recently created user.
  16. Click “Database”.
  17. Select the database that you created for this WordPress site, then click “Go”.
  18. Click “Check all”, then click “Go” to give this user all permissions on the selected database.
  19. Look at the top of the page and write down the host name for your MySQl server. It will look something like “hostname.db” and be found after the text “Server:”.
  20. Run
    pico wp-config-sample.php

    to begin editing the WordPress config file. The section of the file that you’ll focus on editing looks like this:

    // ** MySQL settings ** //
    /** The name of the database for WordPress */
    define( 'DB_NAME', 'database_name_here' );
    
    /** MySQL database username */
    define( 'DB_USER', 'username_here' );
    
    /** MySQL database password */
    define( 'DB_PASSWORD', 'password_here' );
    
    /** MySQL hostname */
    define( 'DB_HOST', 'localhost' );
    
  21. Replace the text that says database_name_here with the name of the database you created in step 9.
  22. Replace the text that says username_here with the name of the user you created in step 13.
  23. Replace the text that says password_here with the password you generated in step 14.
  24. Replace the text that says localhost with the host name you made a note of in step 20.
  25. Optionally, add the line, define('FS_METHOD','direct'); to the wp-config-sample.php file immediately before the /* That's all, stop editing! Happy publishing. */ line. This can make WordPress, Theme and Plugin upgrades easier, but be sure you are aware of the security concerns before doing this.
  26. Press CTRL + X to exit pico.
  27. Press Y to Save modified buffer.
  28. Change the “File Name to write” to wp-config.php, then press enter.
  29. Leave PuTTY open, we’ll come back to it later.
  30. Visit http://example.com/wp-admin/install.php in your browser to run the install script using the config settings you provided.
  31. Follow the on screen instructions to choose a title for your site, and set up the first user.
  32. Click “Install WordPress”.
  33. In PuTTY, run the following commands one after another:
    cd wp-content
    mkdir -p uploads
    chgrp -R web uploads
    chmod -R 775 uploads
    cd ..

    This should ensure that you can upload files to your site (based on recommendation here.)

  34. In PuTTY, run the following command:
    touch .htaccess

    This creates an empty .htaccess file, which can be used for setting up permalinks.

  35. In PuTTY, run the following commands one after another:
    chgrp -R web ../public
    find ../public -type f -exec chmod 664 {} \;
    find ../public -type d -exec chmod 775 {} \;
    chgrp -R web *
    find . -type d -exec chmod 775 {} \;
    find . -type f -exec chmod 664 {} \;

    This will allow the web server to create and modify files. It also sets proper permissions for directories and files. It’s riskier than using the WordPress CLI from a security standpoint, but more convenient for WordPress users.

And that’s it! WordPress should be set up and ready to go!

Leave a Comment

Your email address will not be published. Required fields are marked *