CS · EN

Webhosting - Restoring FTP Directory Structure (Reset)

You can restore the basic FTP directory structure on Webhosting only manually. Instructions for managing files via FTP can be found in the article Webhosting – File Management.

In this article you will learn:


Basic Webhosting directory structure

Immediately after setup, the following files and folders are located on Webhosting:

NameLocationType
sessionroot (root directory)folder
tmproot (root directory)folder
wwwroot (root directory)folder
domainswwwfolder
subdomwwwfolder
.htaccesswwwfile
index.htmlwwwfile

These serve the following purposes:

  • session folder: storage for PHP session data
  • tmp folder: storage for temporary files. If it is missing, file upload issues via PHP may occur
  • www folder: website files (PHP, HTML, CSS, JS, media)
  • domains subfolder: directories of separate alias websites and subdomains
  • subdom subfolder: subdomain directories
  • .htaccess file: web server settings
  • index.html file: file displaying the message about an active Webhosting

Restoring FTP to the default settings

Restoring FTP to the default settings is an irreversible process. Before restoring FTP to the default settings, we strongly recommend backing up the current data according to the instructions in Webhosting – Backup.

You can restore FTP to the default settings via the WebFTP ⧉ client (Manual).

You can perform a manual FTP restore to the default settings in these steps:

  1. Log in to Webhosting FTP with the main FTP account.
  2. Delete all files and directories in the root directory.
  3. In the now empty root directory, create new folders session, tmp and www.
  4. In the www folder, create new folders domains and subdom.
  5. Restore the default .htaccess file.
session, tmp and www folders in the root directory of the webhosting
session, tmp and www folders in the root directory of the webhosting

Common problems

Common problems with restoring the basic Webhosting directory structure include:

Incorrect root directory

Problem: The FTP account leads to the www directory (or another one) and marks it as the root.

The www directory (according to its contents) marked in the tree as root (root directory)
The www directory (according to its contents) marked in the tree as root (root directory)

Cause: All secondary FTP accounts have access only to the www folder or its subfolders. In WebFTP, these are marked as their root directory.

Solution: Consider whether deleting only the website files is enough. If so, delete and restore to the default settings only the contents of the www folder. If not, make sure you have access to an FTP account with access to the root directory (main FTP account).

Invisible .htaccess file

Problem: The .htaccess file is not visible in the FTP client.

Cause: .htaccess is a hidden file.

Solution: Enable display of hidden files in your FTP client, or use WebFTP ⧉.

Error 403: Forbidden after FTP reset

Problem: After the reset, Error 403: Forbidden appears on the website.

Cause: Detailed information about Error 403 can be found in this article.

Solution: Upload an index.html or index.php file into the www folder or into the folder named after your domain in www/domains/, and make sure the default .htaccess file is uploaded in the www folder. If that does not help, restore file permissions according to the instructions in Webhosting – File Management.

New website is not working properly

Problem: The new website does not upload files, does not save settings, or shows other unusual behavior.

Solution: Check that you performed the directory structure reset in the root directory and not in another one (usually the www directory). The tmp and session folders must be located in the root directory; only .htaccess and website files belong in www (optionally the domains and subdom directories).

FTP is unavailable or files cannot be deleted

Problem: I cannot connect to FTP, or delete files.

Solution: Follow the instructions in the article FTP – Troubleshooting.


Frequently asked questions

How do I log in to FTP?

Detailed login instructions can be found in the article FTP – Login. Remember that the only FTP account with access to the root directory is the main FTP account.

How do I know that I am in the correct directory?

The root directory should contain the tmp, session, and www folders; sometimes you may also find backup or logs there. If you see the domains, subdom, and other folders, you are probably in the www directory.

Do I really have to delete absolutely everything? What if I delete something important?

You do not have to delete everything; often it is enough to delete the contents of the www folder, or the corresponding folder in www/domains. In any case, before restoring FTP to the default settings, we strongly recommend backing up the current data according to the instructions in Webhosting – Backup. We cannot guarantee the availability of our backup on our side, especially as the time gap grows.