Knowledge Base›Webhosting›Restoring the FTP Directory Structure (Reset)

Webhosting – Restoring the FTP Directory Structure (Reset)

On this pageWhen to use this guideBasic Directory Structure of WebhostingResetting FTP to the Basic SettingsCommon ProblemsFrequently Asked Questions

Restoring the basic FTP directory structure on Webhosting can only be done manually. You can find a guide to managing files via FTP in the article Webhosting – File Management.

In this article you will learn:


When to use this guide


Basic Directory Structure of Webhosting

Immediately after setup, Webhosting contains the following files and folders:

NameLocationType
sessionroot (root directory)folder
tmproot (root directory)folder
wwwroot (root directory)folder
–domainswwwfolder
–subdomwwwfolder
–.htaccesswwwthe file
–index.htmlwwwthe file

These serve the following purposes:

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

Resetting FTP to the Basic Settings

Resetting FTP to the default settings is irreversible. Before resetting FTP to the default settings, we strongly recommend backing up your current data following the guide Webhosting – Backup.

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

To manually reset FTP to the basic settings, follow these steps:

  1. Log in to the 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 folder www create new folders domains and subdom.
  5. Restore the default file .htaccess.
The session, tmp and www folders in the Webhosting root directory
The session, tmp and www folders in the Webhosting root directory

Common Problems

Common problems with restoring the basic directory structure of Webhosting include:

Incorrect root directory

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

The www directory (judging by its content) marked in the tree as root (root directory)
The www directory (judging by its content) marked in the tree as root (root directory)

Cause: All secondary FTP accounts have access only to the www folder or its subfolders. WebFTP shows these 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).

Files cannot be uploaded

Problem: When uploading images or files to your website, an error appears saying a temporary file cannot be created (File upload error – unable to create a temporary file).

Cause: The root FTP directory is missing the folders tmp and session, often after the entire FTP content has been deleted.

Solution: Log in to with the main FTP account and create the missing folders in the root directory: tmp and session. If that does not help, have the file permissions repaired following the guide Webhosting – File Management.

Subdomain shows the main website

Problem: The subdomain shows the content of the main website, even though the subdomain’s files are uploaded to the FTP.

Cause: The subdomain’s files are not in the correct folder, or the folder www contains a modified .htaccess file that directs traffic to the main website.

Solution: Check that the folders domains and subdom are located in the folder www and that the subdomain’s files are in the right folder according to the guide Webhosting – Subdomains. Then restore the default .htaccess file. For WordPress, check that the website address in its settings belongs to the subdomain, not the main domain.

Invisible .htaccess file

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

Cause: .htaccess is a hidden file.

Solution: Enable showing 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 to the folder www or the folder named after your domain in www/domains/ the file index.html or index.php and make sure the default .htaccess file is uploaded in the www folder. If that does not help, restore the file permissions following the guide Webhosting – File Management.

The new website does not work correctly

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 (typically the www directory). The tmp and session folders must be in the root directory; www should contain only .htaccess and the website files (or 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 guides in the article FTP – Troubleshooting.


Frequently Asked Questions

How do I log in to FTP?

You can find a detailed login guide 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 I am in the correct directory?

The root directory should contain the folders tmp, session and www, and occasionally you will find backup or logs. If you see the folders domains, subdom and others, you are probably in the directory www.

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 folder www, or the corresponding folder in the directory www/domains. Before resetting FTP to the default settings, we strongly recommend backing up your current data following the guide Webhosting – Backup. On our side, we cannot guarantee the availability of our backup, especially as time passes.

I want to build a new website on my Webhosting from scratch. What exactly should I delete on the FTP?

Delete the contents of the folders session and tmp and the contents of the website folder (www or www/domains/wds-test.cz), but leave the folders themselves. Then restore the default .htaccess file and the file permissions following the guide Webhosting – File Management. You do not need to delete the old database; the new website can connect to a different one.

Was this article helpful?

Your feedback helps us improve our articles.

Your message goes to the documentation team, who do not reply to it. If you need help, contact us using the contact form. Do not include passwords or personal data.

Didn't find what you were looking for?

Ask other customers on the Help community website.