I am using cPanel on a live server and want to install a new craft4 project in a subdomain for testing instead of having a local dev setup on my computer. I have done this many times for craft 2 and 3. I usually create a folder on the server named "test" for example, and in that folder I would have 2 folders named public_html and craft. I would move all the contents of the web folder into public_html and the rest into the craft folder. The subdomain root would point to /test/public_html.
My other Craft3 sites, in the index.php in the web (or public_html) folder had a section for defining path constants. This is what I have in that file:
define('CRAFT_BASE_PATH', dirname(__DIR__,1).'/craft');
define('CRAFT_VENDOR_PATH', CRAFT_BASE_PATH . '/vendor');
The knowledgebase on the Craft site has a page, "Moving Craft’s Files Below the Webroot". This tells you to find the line "define('CRAFT_BASE_PATH', dirname(DIR));" and to change it. But there is no such line in the Craft 4 /web/index.php file. I know I'm not moving the app folder below root, more like above it,
What should my index.php file look like? Are there any other files that need editing?