As you already know, .htaccess is one of the most vital files of a WordPress website, it handles the web server’s redirects.
The server searches for the main index file and displays it on the browser whenever someone opens your website. The index.html file controls the default index page.
In such a situation, users might want to change the layout of the default index page, to do so, you need to replace index.html with a new file.
Sometimes, web developers use a new file to display the maintenance page creatively. In this tutorial, you’re going to learn about changing the index page using FTP, you should know, you can accomplish the same task using cPanel, too.
But, a few web hosting companies don’t offer cPanel access, or you may not have the proper privilege. I hope you already know how to connect an FTP account to the server using Filezilla.
Use Your Existing FTP Account or Create a New One
Whenever you install WordPress, many companies ask if you want to create an FTP account for the domain, depending on your choice, you can find an existing account or create a new one.
Connecting to the server using Filezilla, a free software, is easy, and I hope you can do it. Now, you need to learn the main thing.
Follow the steps showing below.
Step 1:
Just below, you can see all the content of your primary domain.
Note: If you host multiple domains, you need to open its folder. Otherwise, public_html is where all of your website’s data is available.
Step 2:
Step 3:
A popup appears to ask if you want to use the default text editor of your computer or you want to use any custom text editor.
Step 4:
It’s possible that you may see a big popup to authorize the certificate.
Once you do it, you can see the .htaccess file in your text editor, where you need to add such code.
DirectoryIndexnewfile.html
Here newfile.html consists the layout of your default index page, and the server will start picking this file.
NOTE: It’s important to upload the newfile.html in the public_html folder because that’s how the server find it.
If you want a backup plan, you can add multiple index files so that if the server doesn’t find the first file, it can load the second or further.
For example, if you choose brandnewfile.html as the second file, the code becomes as follow.
DirectoryIndexnewfile.htmlbrandnewfile.html
You can add as many files as you want. But remember, the server reads your code from left-to-right, it executes the file it finds the first.
Save the file, and you’re done. You have successfully changed the default index page of your WordPress website.
Keeping the nature of your website and its index page, you might need to think twice before changing it. If you’re a newbie and don’t have any idea, you should consult your web developer or the web hosting customer support.
Make sure you understand that the index page controls the layout of your website, if you break it, your site doesn’t load.
Depending on the plugins you use, it’s possible that you may find a different default index file other than index.html.
Conclusion
FTP can be helpful when you don’t have access to the cPanel. Some WordPress users prefer FTP over cPanel because it’s less complicated.
After making a connection, you directly see the data of your website, no extra options. I hope you can easily change the default index page using FTP.
Check out these top 3 WordPress hosting services:
- Check out our recommendations for the best wordpress web hosting.