How To Install WordPress For Beginners
WordPress is a free and open-source software that is widely used to create blogs and websites. In this tutorial, we will discuss how to install WordPress on shared hosting services, Windows, and Mac.
How to Install WordPress on Auto Installer
At Siteground, some tools speed up the WordPress installation process, namely the one-click installer (automatic installation). So, here we will discuss how to install WordPress using this tool:
- Enter CPanel and look for Automatic Installation in the Website section.
- Click the WordPress icon, then complete the requested information, then click Install.
Done! Now you can enter the administrator dashboard. Click the WordPress icon in Actions under List of Installed Applications.
How to install WordPress manually
If the automatic installation tool on Siteground doesn’t work or this tool is not in the hosting provider you are using, the next way is to install WordPress manually. Follow the steps below.
Before Installing WordPress
Some things you need to do before installing WordPress:
- Download and extract the latest version of WordPress.
- Create a database and user. Enter Control Panel and click MySQL Database in the Database section. Complete the requested information and click Create.
IMPORTANT: Write down the MySQL information and the alphanumeric (alphanumeric) string. This information will be needed.
The wp-config.php file contains database information and is also tasked with telling WordPress which database to retrieve the information from. This file is stored in the File Manager in the folder where WordPress is installed.
- Log in to Control Panel.
- In the File section, click File Manager. After that, select Web Root and check the box for Show Hidden Files. Click Go.
- Click the public_html file and open the folder containing the WordPress installation file.
- Locate the wp-config-sample.php file and rename it to wp-config.php. Right-click on the file and select Code Edit.
Look for the following information:
- // ** MySQL settings – You can get this info from your web host ** //
- / ** 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’ ) ;
- Replace database_name_here with the MySQL Database name created earlier.
- Replace username_here with the username that was created and replace password_here with your password.
- Click Save Changes and close the file.
Upload the extracted WordPress files to your public_html file using File Manager or an FTP application, such as FileZilla.
Access the domain via a browser to open the setup page and follow these five steps:
- Select a language and click Continue.
- Complete the MySQL information requested by WordPress, then click Let’s go!
- Enter the MySQL database information. For the Database Host and Table Prefix columns, no changes need to be made, unless you want to run multiple installs in one database. Click Submit.
- WordPress will check the possibility to connect to the MySQL database you created. If there are no errors, select Run the installation.
- Complete the website information and administrator information. Click Install WordPress.
Now you can click Login to enter the WordPress admin area.
How to Install WordPress on a Computer
Installing WordPress on a computer means that you will have a testing environment for your website before it goes online.
How to install WordPress on a Mac with MAMP
To install WordPress on a Mac, we use MAMP (Macintosh, Apache, MSQL, PHP).
With this tool, you can create PHP and MySQL servers on a local device. Simply put, you will have everything you need to test WordPress on a computer.
Install MAMP and Create Database
Just like when installing this CMS on a shared hosting service, you must prepare the server and database first:
- Download and install the latest version of MAMP on Mac.
- There’s nothing to set up or customize in the WordPress installation wizard. Wait until the install process is complete.
- Go to the Database tab and create a database.
- Give the database a name, then click Create. For example, for this tutorial, we named the database w0rdpr3ss.
For those using FTP, you can skip this step. Meanwhile, for those who don’t have WordPress, download it first, and extract the file to your computer. If you have shell access to the web server, use the command below to download WordPress:
and extract the WordPress files with this command:
tar -xzvf latest.tar.gz
After that, do the following steps:
- Move all the files in the WordPress folder to the default MAMP document root: Applications / MAMP / htdocs.
- Type ‘localhost: 8888‘ in the browser to run the WordPress installation wizard.
- Enter the Database Name. Then complete root with Username and Password. Click Submit.
On the screen that appears, complete the website information, namely by adding a username, password, and email address. Click Install WordPress. If the install is successful, a message will appear.
How to install WordPress on Windows using WampServer
To install WordPress on Windows devices, we use WampServer. WampServer itself consists of Windows, Apache, MySQL, PHP.
Install WampServer and Create Database
Download the latest version of WampServer and follow these steps:
- Install WampServer. There is no need to do any configuration at this stage. You only need to select the default browser and default text editor for the server to use.
- Open WampServer from the taskbar and activate phpMyAdmin.
- At the login screen, add root as the username. Leave the password field blank.
- Open the tab Database, enter a name, and Create (create) a new database for WordPress.
- Click the Users tab. Make sure the user associated with WordPress appears. If not, create a new user.
Here are the steps:
- Move all the existing WordPress files in the document root directory C: / wamp64 / www on the computer.
- Enter ‘localhost’ in the browser field to open the setup page.
- Select the language and complete the database information. Use root as the username and leave the password field blank.
Make sure you have done all the steps correctly so that WordPress appears on Windows devices.
Common Errors That Often Occur When Installing WordPress
The browser looks at directory listings instead of web pages
This happens because the web server doesn’t see the index.php file. This error can be fixed with Apache. Use the DirectoryIndex index.php directive and create a new file in the installed directory, which is .htaccess. If it doesn’t work, delete and add the directive to the webserver configuration file.
This error can be caused due to a syntax error while editing the wp-config.php file. To fix this, download the wp-config.php file again. Open the file in a text editor and make sure the first line contains only? Php. Whereas at the very end, there is only ?. Save the file and upload it again. Then reload the web page.
The appearance of the web page is messy
If a web page looks messy and the source code contains the <? Php?> Tag, means that PHP is not working properly. All PHP code must be executed before the server sends the HTML results to the web browser. So, to solve this, make sure the webserver is qualified to run WordPress. Also, check whether PHP is installed correctly and there are no errors when configured. If the web page still has errors, immediately contact your hosting provider or customer support team.
An error occurred while connecting to the database
If an error message appears which tells you that there was a database connection error but the configuration was done correctly, the solution is to change or reset the password. To do it via shell, use this command:
SET PASSWORD FOR 'wp_username' @ 'hostname' = OLD_PASSWORD ('new_password');
If there is no shell access, log in to phpMyAdmin and add the above command to the SQL query. If this method doesn’t work, log in to the panel and change the password via the Database section.
Congratulations! Now you have learned how to install automatic and manual WordPress on a shared hosting account. You also know what steps you need to take to activate WordPress on Mac and Windows devices.
Hopefully, this WordPress install tutorial was useful for you! Please leave comments or criticisms and suggestions in the column below.
Mustafa Al Mahmud is the Founder and CEO of Gizmo Concept and also a professional Blogger, SEO Professional as well as Entrepreneur. He loves to travel and enjoy his free moment with family members and friends.