# How to upload Slim project on the new host?

**URL:** <https://discourse.slimframework.com/t/how-to-upload-slim-project-on-the-new-host/5216>\
**Category:** Questions\
**Created:** [March 12, 2022, 11:33am UTC](https://discourse.slimframework.com/t/how-to-upload-slim-project-on-the-new-host/5216 "2022-03-12T11:33:21Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![alikalik13](https://avatars.discourse-cdn.com/v4/letter/a/e79b87/32.png) [@alikalik13](https://discourse.slimframework.com/u/alikalik13)\
**Post date:** [March 12, 2022, 11:33am UTC](https://discourse.slimframework.com/t/how-to-upload-slim-project-on-the-new-host/5216/1 "2022-03-12T11:33:21Z")

</div>

Hi, I found one of my old projects on Slim Frimework.  
However I did not work with SLim loong time, and have no idea already how to set it up on the new server and run. I have just .zip file with all files. Can someone please help me?

Thanks ina dvance!

---

<div class="post-metadata">

**Author:** ![odan](https://avatars.discourse-cdn.com/v4/letter/o/9de053/32.png) [@odan](https://discourse.slimframework.com/u/odan)\
**Post date:** [March 12, 2022, 12:22pm UTC](https://discourse.slimframework.com/t/how-to-upload-slim-project-on-the-new-host/5216/2 "2022-03-12T12:22:52Z")

</div>

What have you tried so far? What exactly is not working?

---

<div class="post-metadata">

**Author:** ![alikalik13](https://avatars.discourse-cdn.com/v4/letter/a/e79b87/32.png) [@alikalik13](https://discourse.slimframework.com/u/alikalik13)\
**Post date:** [March 12, 2022, 12:34pm UTC](https://discourse.slimframework.com/t/how-to-upload-slim-project-on-the-new-host/5216/3 "2022-03-12T12:34:26Z")

</div>

I dont reallt know how to do it. I tried to move all files under public\_html directory, but it does not open files. probably needs to be installed somehow.

I tried toinstall framework itslef.  
[https://alcorium.cz/](https://alcorium.cz/)

---

<div class="post-metadata">

**Author:** ![odan](https://avatars.discourse-cdn.com/v4/letter/o/9de053/32.png) [@odan](https://discourse.slimframework.com/u/odan)\
**Post date:** [March 12, 2022, 2:52pm UTC](https://discourse.slimframework.com/t/how-to-upload-slim-project-on-the-new-host/5216/4 "2022-03-12T14:52:46Z")

</div>

Try to set the `public/` directory as DocumentRoot.

---

<div class="post-metadata">

**Author:** ![alikalik13](https://avatars.discourse-cdn.com/v4/letter/a/e79b87/32.png) [@alikalik13](https://discourse.slimframework.com/u/alikalik13)\
**Post date:** [March 12, 2022, 5:02pm UTC](https://discourse.slimframework.com/t/how-to-upload-slim-project-on-the-new-host/5216/5 "2022-03-12T17:02:27Z")

</div>

\*ts not possible on the host as support says…

---

<div class="post-metadata">

**Author:** ![alikalik13](https://avatars.discourse-cdn.com/v4/letter/a/e79b87/32.png) [@alikalik13](https://discourse.slimframework.com/u/alikalik13)\
**Post date:** [March 12, 2022, 5:03pm UTC](https://discourse.slimframework.com/t/how-to-upload-slim-project-on-the-new-host/5216/6 "2022-03-12T17:03:05Z")

</div>

Is it possible please to try to install in your end? [https://alcorium.cz/APV-project.zip](https://alcorium.cz/APV-project.zip)

---

<div class="post-metadata">

**Author:** ![odan](https://avatars.discourse-cdn.com/v4/letter/o/9de053/32.png) [@odan](https://discourse.slimframework.com/u/odan)\
**Post date:** [March 12, 2022, 6:52pm UTC](https://discourse.slimframework.com/t/how-to-upload-slim-project-on-the-new-host/5216/7 "2022-03-12T18:52:28Z")

</div>

You can consult me if you need someone to install it. Otherwise try the following steps first:

1. Open `public/.htaccess` and remove this line `RewriteBase /~xkhachat/devel/public`

```auto
# Redirect to front controller
RewriteEngine On
# RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [QSA,L]

```

1. Create a second .htaccess file in your project root directory and copy/paste this content:

```auto
RewriteEngine On
RewriteRule ^$ public/ [L]
RewriteRule (.*) public/$1 [L]

```

This `.htaccess’ file in your project root directory redirects traffic internally to the public directory.

Read more: [Slim - Apache configuration](https://www.slimframework.com/docs/v4/start/web-servers.html#apache-configuration)

---

<div class="post-metadata">

**Author:** ![alikalik13](https://avatars.discourse-cdn.com/v4/letter/a/e79b87/32.png) [@alikalik13](https://discourse.slimframework.com/u/alikalik13)\
**Post date:** [March 12, 2022, 9:11pm UTC](https://discourse.slimframework.com/t/how-to-upload-slim-project-on-the-new-host/5216/8 "2022-03-12T21:11:51Z")

</div>

Can you please install it ?
