To remove index.php from your WordPress URL you will need to do two things.
The first step is updating the Permalinks within the WordPress Dashboard.
Login to your WordPress Dashboard and Click Settings > Permalinks. Under Common Settings, Select Custom Structure and in the text field enter /%postname%/
Click Save Changes
The second step is creating an .htaccess file which is then uploaded into the root location of the WordPress site.
The .htaccess file will contain the below rules:
# Helicon ISAPI_Rewrite configuration file
# Version 3.1.0.87
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/wp-admin/
RewriteRule ^(.*)$ index.php/$1 [NC,L]