1. Set up a local server environment: You can use software like XAMPP (for Windows, macOS, or Linux) or MAMP (for macOS) to create a local server environment on your computer.
What is Xampp and use of xampp :-
XAMPP is a software package that provides a local web server environment for running dynamic websites and web applications on your computer. The name "XAMPP" stands for cross-platform (X), Apache (A), MySQL (M), PHP (P), and Perl (P). It is available for Windows, macOS, and Linux operating systems.
XAMPP includes several components:
Apache: It is a popular web server software that serves web pages to users when they visit a website.
MySQL: It is a relational database management system (RDBMS) that stores and manages the website's data.
PHP: It is a server-side scripting language used for developing dynamic web pages and web applications.
Perl: It is a programming language often used for tasks like text processing, system administration, and web development. phpMyAdmin: It is a web-based tool that allows you to manage and interact with your MySQL databases through a graphical user interface.
XAMPP is primarily used for local development and testing purposes. It provides a convenient way to set up a complete web server environment on your computer, allowing you to develop and test websites or web applications without the need for an internet connection or a remote web server. It is commonly used by web developers, web designers, and students learning web development.
2. Download and install XAMPP or MAMP from their respective websites.
Launch the software and start the Apache web server and MySQL database.
Download WordPress: Visit the official WordPress website at wordpress.org and download the latest version of WordPress.
3. Extract the WordPress files: After downloading, extract the WordPress.zip or WordPress.tar.gz file to a folder within your local server's web directory. In XAMPP, this is typically the "htdocs" folder, while in MAMP, it is the "htdocs" subfolder of the MAMP installation directory.
4. Create a database: Access the local server's control panel (phpMyAdmin) by visiting "http://localhost/phpmyadmin" in your web browser. Create a new database for your WordPress installation.
5. Configure the WordPress database: Open the WordPress folder that you extracted in Step 3. Locate the "wp-config-sample.php" file and rename it to "wp-config.php." Open this file in a text editor and update the following details:
Database Name: Enter the name of the database you created in Step 4.
Username: By default, the username is "root" in XAMPP or "root" in MAMP.
Password: By default, the password field is empty in XAMPP or "root" in MAMP.
Database Host: Keep it as "localhost."
Save the changes to the "wp-config.php" file.
6. Install WordPress: Open your web browser and enter "http://localhost/your-folder-name" in the address bar. Replace "your-folder-name" with the name of the folder where you extracted the WordPress files. The WordPress installation wizard should appear.
Select your preferred language.
Enter a title for your website.
Provide an admin username, password, and email.
Click on the "Install WordPress" button.
7. Complete the installation: Once the installation is complete, you can log in to your WordPress dashboard by visiting "http://localhost/your-folder-name/wp-admin" in your web browser. Enter the admin username and password you set during the installation.
Congratulations! You have successfully installed WordPress on your local server. You can now customise your website, install themes and plugins, and begin building your local WordPress site.