There is a lot of ways to remove index.php in URL for the WordPress website. The simple and easy way is Goto Admin Dashboard->Settings->Permalink->Common Settings->choose Post name and click Save changes button at the bottom of the page.
For SEO purposes we need to remove index.php from the website URL and after it is removed the URL will look pretty good and SEO friendly.
Step by step instruction to remove index.php in URL for WordPress website with Screenshot
1. Go to Admin Dashboard and Click settings in the sidebar menu.
2. Under the Settings menu click the Permalink menu. Permalink Settings page will open
3. Under Common settings choose the Post name radio button
4. Click the save changes button at the end of the page
We hope this helps. Thanks for reading :).