My wordpress site displaying “index of/” with all the files and directories, help!

Today, I went to my WordPress site and saw a list of files and directories, including the index.php file. What might be causing this?

I recently installed the Rank Math plugin and tried to check the sitemap, but it wouldn’t open. When I visited my site, it just showed a file list instead of loading normally. I’m not sure when this started. I quickly restored a backup, but before that, the admin page was still accessible and working fine.

Could this be a hack, or did the plugin mess up my site? I didn't check my site before installing it, don't really know what happened.

Also, if there’s an index.php file, but the server still shows a file list, why is that? Could it be an .htaccess issue? (Apache server).

thank you.

2 Comments
  1. This is Indeed related to your hosting/web server configuration. Have you changed the htaccess if Apache, or nginx conf ?

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer