As a general rule, the index file is the default start page, so it will be displayed when you access your domain (www.example.com). In this article, we explain how to change the default start page when switching from WordPress to our Website Builder and how to set up the order of your index files. This way, visitors will see the start page you want them to see when they access your domain.
Switching from WordPress to the one.com Website Builder
A website that is created in the one.com Website Builder is based on HTML, in contrast to websites based on PHP - like WordPress. As mentioned, a browser opens the homepage via the so-called index file (index.html or index.php). An index.php has priority over an index.html. For the browser to open the index.html, you must rename the index.php via the File Manager or delete it.
Note: We recommend deleting WordPress installations that you do not use anymore. Old WordPress installations are often forgotten and not updated. This makes them vulnerable to hackers.
If you want to rename the index.php, follow these steps:
- Log in to the one.com control panel.
- Click File Manager on the Files & Security tile. File Manager will open on a new screen.
- Select the index.php file by checking the check box in front of the file.
- Choose Rename next to the pencil icon in the top right pane.
- Enter the new name, for example, index-1.php or index-old.php.
Please don't use spaces, and remember that the file extension .php is already prefilled. - Press Enter on your keyboard to save the file.
Set up your preferred order of index files
With .htaccess, you can change which file will be shown first and in what preferred order. You can, for example, use this:
DirectoryIndex home.html index.html index.htm index.php
Adding this line of code will, by default, show home.html when you go to your website. If that file is unavailable, the server will try to load in respective order: index.html, index.htm, index.php, provided these files are on your web space in the same directory.
Related articles: