CakePHP move from one folder to another

Hello,
I am trying to see if I can help a client who has no developer to do the move
there are two domains new and staging each of these point to folders on the server
public_html/new and public_html/staging
the new environment is the live production and staging is the tested development
I need to know how I can move the staging to new, things I know is to change the app.php to look at the live DB and to clean out the tmp cashe directories. Want must I do, I am new to cakePHP and doing youtube training to learn quickly

Are public_html/new and public_html/staging two completely separate cakephp installations?

it looks like it, I would say yes

If staging is latest clone of new just rename the folder and update database details

Hi,
I did try that and I was given an error of access denied. So I rolled back, would it be possible to only move the src directory over? Should the be other directories I should consider?
I will share a snapshot of the two directories

main directory


new directory


staging directory

I was going to back up the New directory, then copy the SRC and PLUGIN from Staging over. Then cleaning out the tmp folder under the New directory

vendor and webroot directories are also pretty critical.

This also seems to be a CakePHP 3 app because you don’t have a templates directory.
Doesn’t mean that what has been said is wrong, just that its an older version.

You can also check if there are any not run migrations via bin/cake migrations status but if you (or your friend) don’t know what migrations are then you should be extra carefull to have at least a database backup.

OK, thank you. I will move those as well. I just thought vendor would not change

It is a CakePHP 3 app, they still have the .ctp files which I don’t see in the version 4 I am learning on.

I did make backups, in case I will need to restore back

I will run bin/cake migrations statusand post results

bin/cake migrations status only shows you the status of migrations if they have already ran or not.
To actually execute them you need to execute bin/cake migrations migrate.

So both “outputs” are not really something “usefull” where we can help you. The real important stuff is what is being programmed inside those not run migrations (if there are any).

But thats also something you (or your colleague) needs to look at because the content of migrations is very very dependent on what application you are running and what you try to achieve with that migration.

I am a little confused now, there are two identical environments. NEW which has the live scripts and packages(APPLICATION), then STAGING which has all the new development. I am not aware of any migration, nor do I know if one was set up. The development team has tested their changes and they are ready to move to NEW. I am just picking up the tail end to move the new development and have not worked with CakePHP. So I am seeking help as there is not much out there, the first time I did a rename and changed the config to look at the live DB, it gave too many errors so I rolled back. Now I looking at coping over the main directories from STAGING to NEW and checking again

Seems like your development team is familiar with Cake? Why can’t they help you with this process? The errors you get might be things that they immediately recognize and can tell you how to resolve. For example, maybe they added a new dependency and you just need to run composer install on the new folder.

they are no longer available to ask