I've no clue about PHP.

I've PHP site located on Server A. Now I wish to transfer the hosting to a different company getting Home windows hosting on Server B.

Can One just transfer all of the items in WWWROOT folder of Server A to Server B? Will the website work this way? Or I do need to obtain the source, compile and publish it?

Thanks!

PHP isn't (usually) put together, you should have the ability to simply copy the files and sites over plus they should a minimum of run. You might want to setup a database and connections into it, change some configuration within the scripts and also you might encounter incompatibilities between different PHP versions and/or UNIX/Home windows problems though, for the way portable the scripts were written.

the operation is this:

  1. copy this content from server One place to another (also db dump)
  2. make certain your internet site is focusing on server B correct
  3. set a redirect on server A to server B (usually inshtaccess file)
  4. edit DNS records to suggest to server B
  5. wait that DNS changes happen to be acquired (note: as recommended by Emil you are able to reduce this time around by lowering TTL setting around the DNS records)
  6. remove content from server A (finish hosting)

you don't have to compile anything. it's enough copying project directory in one server to a different. one factor may cause assembling your shed not focusing on ohter hosting, if there won't be installed some php-extensions which are needed for you personally project. not to mention, in case your project uses some databases, they ought to be produced on new server

PHP scripts are source code and therefore are put together if needed. Simply moving the files is sufficient. Problems may occur if it's a package that's been isntalled on that server and could possess some qualities in a variety of files about absolute pathways with other files.

Also, issues will occur when the files are speaking to some local SQL server or even the such.

Many website hosts provide a free (or sometimes payed) plan to copy your site accross including any databases. Request your webhost for help.

You don't need to compile, however you need to make certain the new server meets all of the needs of the application (e.g. server modules) which pathways are properly set up. Also under some conditions the PHP version can matter too. Only one method to discover!