Remove index.php from wordpress url on aws ec2 cloud instance
Want to remove index.php from your wordpress website url?
On some servers it is pretty straightforward, BUT on cloud i.e. AWS or any other provider, it is bit tricky as our server might not be properly configured.
Here we go-
Step 1: Run this command
Step 2: Open the file “000-default-conf” in your favorite editor
sudo nano 000-default.conf
Step 3: Add the following rule:
And save the file by pressing ‘ctrl+x’. It will ask for ‘yes’ or ‘no’, press ‘y’ and enter.
Step 4: Install apache mod_rewrite module and run the following command on your ssh
sudo a2enmod rewrite
Step 5: Restart the apache server
sudo service apache2 restart