Configure PHP projects on Wappler Beta

Hello.
I’m trying to understand how the new feature works in PHP projects on Wappler.
I know that now projects have to be located in a folder called WWWW (subfolder in the project root).
When I open the project made in Wappler 5.8.2 directly in Wappler Beta, it warns me that I have to move the files to a subfolder (www) and does so if I click YES. So far so good. But the problem starts when I try to open the project in the browser.
Because the site files are now in the WWW folder, the site pages do not open.
Do I have to change the routes or set the site target to the WWW folder?

Another situation:

I create a project from scratch in Wappler 6 Beta.
I configure the WWW subfolder and set the target to https://teste2.dev/www or https://teste2.dev.
I’m using Laragon as a Localhost server and I configured the Virtual Host for .dev (in Wappler 5.8.2) I don’t have any problems and it works normally).
The site only loads if I target https://teste2.dev/www but the assets stop working (.css and.js) because they look in the root of the site and not in the WWW folder.

What should I do or configure? I looked for tutorials on the subject and I didn’t find anything in the documentation either.

There are two ways to run a PHP project on a local system:

  1. a server environment like Wamp/Mamp in which case the target would be set to http://localhost/[project]
  2. using the Wappler local server in which case the target would be localhost:3000

Wappler’s local server is dedicated to the project and only runs while the project is open. As soon as the project is closed, so will the server be closed.

The www folder is the root folder for the project.

The directory structure is as follows:

image

If you have existing (pre-Wappler) projects, they will undoubtedly be using a Wamp/Mamp type server. In that case do not use the Wappler Local Server. Instead use your Own Server, making sure that they are running when the project has been selected.

I hope this helps.

Hello @ben.
Many thanks for the reply.
I created two test projects:

  1. I used Xampp http://localhost/test1 and the index does not open. Xampp shows the site structure instead of opening the site’s index or pages. If I enter http://localhost/test1/www the index opens but without the styles and without the javascripts. I put links related to ROOT.
  2. It worked normally and without problems on http://localhost:3000.
    In this option, when I deploy (I use cPanel) I just send the files and folders that are inside the WWW, right?!
  1. If you use Xampp, then you must assign Own Server in the project settings. The link will be http://localhost/test1
  2. If you use the Wappler Local Server then the link will be http://localhost:3000. When deploying, the files contained within the www folder will be uploaded to the remote www folder.

Hello.
Perfect. I solved it with the http://localhost:3000 option but with the http://localhost/test1 option the site does not open and also gives an error when testing the URL in Wappler. Is it because of the WWW folder?

No! It is because you are using the Wappler Local Server and not your local Apache (Xampp) server.