Skip to content

How to install WordPress?

  1. Install the local server environment (This provides the necessary Apache server, PHP, and MySQL components):
  • XAMPP (Windows, macOS, Linux)
  1. WordPress Project Files: Have the WordPress project files available. This might be a zipped project folder.

  2. Database Details: Confirm or set up your database credentials and name, which you’ll use for the local installation.

  1. Install and start your preferred local server environment.

  2. Open the control panel and start the Apache and MySQL services.

  3. Confirm the server is running by opening http://localhost in your web browser.

  1. Go to http://localhost/phpmyadmin.
  2. Click on Databases at the top.
  3. Enter a name for your database (e.g., db_project) and select Create.

Note: Remember this database name as you will need it in the following steps.

Step 3: Download or Clone the WordPress Project:

Section titled “Step 3: Download or Clone the WordPress Project:”
  1. If you have the project files as a zip:

Unzip the project into your local server’s root directory:

  • XAMPP: htdocs folder (e.g., C:\xampp\htdocs\wordpress_local)
  1. If you’re using Git to clone the repository:
  • Clone the repository:
git clone https://github.com/yourusername/your-wordpress-repo.git
  1. Open the WordPress project folder and locate wp-config-sample.php.

  2. Duplicate it and rename it to wp-config.php.

  3. Open wp-config.php and configure the following lines:

define('FTP_HOST', 'localhost');
define('FTP_USER', 'daemon');
define('FTP_PASS', 'xampp');
define('FS_METHOD', 'direct');
  1. Save and close the file.

Step 5: Create .htaccess file in the root of the project:

Section titled “Step 5: Create .htaccess file in the root of the project:”
  • This .htaccess file is a typical setup for WordPress projects requiring more control over server behavior, especially if you host your website on an Apache server.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /wp-projectName/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /wp-projectName/index.php [L]
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /wp-projectName/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /wp-projectName/index.php [L]
</IfModule>
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin "*"
</IfModule>
php_value upload_max_filesize 7G
php_value post_max_size 7G
php_value memory_limit 7G
php_value max_execution_time 300
php_value max_input_time 300

Step 6: Give permissions for the project using the console:

Section titled “Step 6: Give permissions for the project using the console:”
sudo chmod -R 777 /Applications/XAMPP/xamppfiles/htdocs/wp-projectName
  1. Go to your browser and visit http://localhost/your-project-folder-name.

  2. Follow the WordPress installation steps:

  • Choose your language.
  • Set up your site title, admin username, and password.
  • Enter your email address.
  1. Click Install WordPress.
  • After installation, log in to the WordPress dashboard at:
http://localhost/wp-projectName/wp-admin
  • Use the credentials you set up during installation.

Step 9: Install and activate the must-have plugins:

Section titled “Step 9: Install and activate the must-have plugins:”
  • Advanced Custom Fields PRO:
    1. localhost/wp-projectName/wp-admin
    2. ‘Plugins’ tab
    3. ‘Add New Plugin’
    4. ‘Upload Plugin’
    5. Upload ZIP file

Your local WordPress installation is now ready!

Section titled “Your local WordPress installation is now ready!”