WampServer is a popular free tool for setting up a local WordPress development environment on your computer. We will be using it to set up your computer to run PHP:

1. Download and Install WampServer

– Visit the wampserver.aviatechno.net website and download the current version of the installer (3.7.7)
– Run the installer and follow the on-screen instructions to finish installing WampServer.

2. Launch WampServer :

– After installation, launch the WampServer by clicking the green WampServer icon in your task bar.

3. Create a New WordPress Site:

– Once logged in, click the “+ add local site” button on the bottom left.
– Click “Continue”
– Enter a name for your site, choose a local domain name (e.g., php-workspace), and select the environment (select “Custom”).
– Choose the web server (Apache or Nginx), PHP version, and database version.
– Click “Continue”
– Enter a WordPress user name (admin), WordPress password (admin), and an email address.
– Click the “Add Site” button to create your local WordPress site.
– Click “Yes” when it asks you to allow this app to make changes to your device?

4. **Start the Local Environment:

– Click on your newly created site in the Local by Flywheel dashboard.
– Click the “Start Site” button to launch the local development environment.
– Local by Flywheel will automatically set up the web server, PHP, and MySQL for your WordPress site.

5. **Go to Site Folder:**

– Once the environment is running, click on the “Go to site folder” button to access your new phpworkspace folder. This opens a folder called php-workspace and has 3 folders in it: app, conf, and logs.
– Open the app folder
There you will see two folders: public and sql
– Open the public folder
– There you will see the WordPress installation files
– Select all the files and delete them
– we are not working within the WordPress environment at this point
– open your favorite program editor (eg notepad++)
– create an index.php file and save it in your Local Sites\php-workspace\app\public folder

6. **Develop in your PHP Workspace:**

– You can now develop and customize your PHP site locally, just like you would on a live server.
– as you make changes in the editor you can save the file
– then refresh the view in your web browser

7. **Stop and Restart Your Local Environment:**

– In the Local by Flywheel dashboard, you can stop or restart your local site’s environment as needed.

Local by Flywheel provides an easy-to-use interface for managing local PHP and MySQL development environments. It also allows you to create and manage multiple sites for different projects.

Comments (0)

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