# Uploading a site with cPanel File Manager: zip upload, extract, public_html and file permissions

https://www.gyrohosting.com/en/knowledgebase/article/cpanel-file-manager-upload-site

- **What you will learn**: How to upload your site as a single zip file, extract it in cPanel, why files go into the `public_html` folder, which file permissions are correct, and how to see hidden files such as `.htaccess`.
- **Time**: 10 minutes

## 1. Why File Manager, and why a zip?

**File Manager** is the cPanel tool for managing the files in your hosting account from your browser. There's nothing to install.

Uploading hundreds of files one by one takes a long time and can leave some files missing. Instead, you turn your site into **a single zip file** on your computer, upload it, then extract it in cPanel with one click. The sample zip in this guide is called `gyro-proje-site.zip`.

> **Info**
> 
> Hosting plans have no SSH (command line). You handle files with File Manager or FTP (see B15).

## 2. public_html: which folder does your site go in?

When File Manager opens you see your account's **home directory** (`/home/username`). It contains several folders; the one that matters for your site is **public_html**.

![File Manager opens in your home directory. Your site's files go into the public_html folder.](https://www.gyrohosting.com/resources/uploads/bilgi-merkezi/B14-01-en.webp)

| Folder | What it's for |
| --- | --- |
| **public_html** | The site for your main domain. When `ornekfirma.com` is opened, the files in this folder are served. |
| **public_ftp** | A folder reserved for anonymous FTP; not used for your site. |
| **mail**, **etc**, **ssl**, **logs**, **tmp** | Mailboxes, settings, certificates, log files. Don't change these by hand. |

> **Warning**
> 
> Your site's home page must sit **directly inside** `public_html` as `index.html` or `index.php`. If it ends up in a subfolder such as `public_html/site/index.html`, your site opens at `ornekfirma.com/site` instead of `ornekfirma.com`.

Your addon domains and subdomains have their own folders, set when you add the domain (see B17 and B18).

## 3. Upload the zip file

1. On your computer, open the folder that holds your site. Select the **files inside it** (not the folder itself) and compress them to a zip. That way `index.html` lands directly in the target folder when the zip is extracted.
2. In cPanel, open **File Manager** in the **Files** group.
3. Double-click the **public_html** folder in the tree on the left or in the list.
4. Press **Upload** in the toolbar at the top.

![After opening the target folder, press Upload in the toolbar at the top.](https://www.gyrohosting.com/resources/uploads/bilgi-merkezi/B14-02-en.webp)

1. The **File Upload** page opens. The top of the page shows the folder the file will be uploaded to; check it's the right one.
2. Drag your zip file onto the dashed area, or press **Select File** and choose it.
3. Wait until the progress bar reaches 100% and the upload completes.
4. Use the **Go Back** link at the bottom of the page to return to File Manager.

![The upload page: drag your zip file onto the area or choose it with Select File; upload progress appears on the same page.](https://www.gyrohosting.com/resources/uploads/bilgi-merkezi/B14-03-en.webp)

> **Info**
> 
> If you are uploading a file with the same name again, tick **Overwrite existing files**; otherwise the upload is refused.

## 4. Extract the zip file

1. Click your zip file in the list **once** to select it (the row turns blue).
2. Press **Extract** in the toolbar.

![Click the uploaded zip file once to select it, then press Extract in the toolbar.](https://www.gyrohosting.com/resources/uploads/bilgi-merkezi/B14-04-en.webp)

1. In the **Extract** window, check the path the files will be extracted to. The default is the folder the zip is in (for example `/public_html`).
2. Press **Extract Files**.
3. Close the window that lists the extraction results and press **Reload**.

![In the window that opens, check the folder to extract into and confirm. The default is the folder the zip is in.](https://www.gyrohosting.com/resources/uploads/bilgi-merkezi/B14-05-en.webp)

Your site files now appear in the folder. You no longer need the zip file; select it and press **Delete**.

![After extraction your site files appear in the folder. index.html is the first page visitors see; you can now delete the zip file.](https://www.gyrohosting.com/resources/uploads/bilgi-merkezi/B14-06-en.webp)

> **Info**
> 
> In the screenshots, the sample site was extracted into the sample account's `public_html/gyro-proje` folder. Extract your own site directly into `public_html`.

## 5. Check file permissions

File permissions decide who the server lets read and write each file. The **Permissions** column in the list shows each file's value.

| Type | Correct value | Meaning |
| --- | --- | --- |
| Files (`.html`, `.php`, `.css`, images) | **644** | You read and write; visitors only read. |
| Folders | **755** | You write; visitors can enter and read. |
| A settings file holding secrets (for example a database password) | **600** or **640** | Stricter, if your application supports it. |

To change a permission:

1. Select the file or folder.
2. Press **Permissions** in the toolbar.
3. In the **Change Permissions** window, tick the **Read**, **Write** and **Execute** boxes under **User**, **Group** and **World**. The numeric value appears in the **Permission** boxes below (for example 6, 4, 4 = 644).
4. Press **Change Permissions**.

![The Permissions window: 644 is right for files and 755 for folders. The numeric value updates as you tick the boxes.](https://www.gyrohosting.com/resources/uploads/bilgi-merkezi/B14-07-en.webp)

> **Warning**
> 
> Never give a file or folder **777**. It means anyone can write to it, and it's the hole malware uses most often. If a plugin asks for 777, try 755 first; if the problem persists, open a support ticket.

## 6. Show hidden files (.htaccess)

Files whose names start with a dot (`.htaccess`, `.user.ini` and so on) are hidden from the list by default. To set up redirects or PHP settings you need to see them:

1. Press **Settings** at the top right.
2. In the **Preferences** window, tick **Show Hidden Files (dotfiles)**.
3. Press **Save**.

![Settings → Show Hidden Files: tick it to see files that start with a dot, such as .htaccess.](https://www.gyrohosting.com/resources/uploads/bilgi-merkezi/B14-08-en.webp)

In the same window you can choose which folder File Manager opens in every time (for example **Web Root (public_html or www)**).

## 7. Troubleshooting

| Symptom | Likely cause | Fix |
| --- | --- | --- |
| A file listing or blank page appears instead of the site | No `index.html` / `index.php`, or it stayed in a subfolder | Move the files directly into `public_html` (**Move**). |
| The site opens at `ornekfirma.com/site-name` | The zip was made with the folder itself inside | Select the files in the subfolder and **Move** them to `/public_html`. |
| **403 Forbidden** error | Wrong file/folder permission or an `.htaccess` rule | Set files to 644 and folders to 755; see **B09** for more. |
| **500** error | A bad line in `.htaccess` or a PHP error | Temporarily rename `.htaccess` and retry; check the PHP version. |
| The upload stops halfway | The file is too large or the connection dropped | Split the site into a few smaller zips, or upload with FTP (**B15**). |
| File names with non-English characters look broken | The zip was made with a different character encoding | Avoid non-English characters and spaces in file names (`iletisim.html`, `about.html`). |

## 8. Frequently asked questions

**Can I upload rar or 7z instead of zip?**

File Manager's **Extract** tool works with zip, tar and gz archives. Zip is the most trouble-free; open a rar/7z file on your computer and re-compress it as zip.

**Can I get back a file I deleted?**

Files you remove with **Delete** in File Manager go to the **Trash**, unless you chose permanent deletion in the delete window. Open **View Trash**, select the file and press **Restore**. If you emptied the trash, check your backups (**B20**).

**I'm installing WordPress. Do I need to upload a zip?**

No. You can install WordPress in a few clicks with **Softaculous Apps Installer** in cPanel. The zip method is for uploading a ready-made site or a backup from somewhere else.

**Can I edit a file in the browser?**

Yes. Select the file and press **Edit**; it opens in the browser. We recommend making a copy first (**Copy**).

**How do I download many files to my computer?**

Select the files, use **Compress** to make one zip, then select the zip and press **Download**.

> **Did you know?**
> 
> If you have a cPanel account with another provider, you don't have to move files one by one: our team migrates up to 2 sites for free (**B19**).

## Next steps

- **Uploading many or large files?** **B15 — Creating an FTP account and connecting with FileZilla**.
- **See hosting plans:** [Web Hosting](https://www.gyrohosting.com/en/hosting).
