Not a web person in the slightest so this is probabaly a really silly question, but if I have a site that I have created using php and sql, how easy is it to move to a different server / location. I want to design a site using a local hosting package on a laptop and then upload to the webserver, unless this is going to be a complete pain to do?
Not that difficult. Important things to consider are:
- PHP versions - if your website will contain code that is compatible with one and not the other you will have problems. Major versions are usually compatible with eachother (eg. If both are PHP4 then you will be OK. If you have PHP5 and they have PHP4 you might have a few problems depending on the code
- PHP extensions - if you use anything special such as GD/SOAP etc, make sure the hosting company has them enabled too
- File permissions - If your scripts needs write access to any files/folders, make sure you or the web hosting company can grant the appropriate permissions.
- Disk space - Simple really. Will you have enough space with the hosting company to store all your files
- Paths - Always use relative paths wherever possible (eg. /folder/subfile.php, rather than hard-coding http:/localhost/folder/subfile.php
- MySQL versions - same rules as PHP really. If the versions are similar then it should work, but there are things such as table types to watch out for (InnoDB vs. MyISAM for example)
As for uploading one to the other - with files, just use your favourite FTP application. For MySQL - use something like phpMyAdmin to export and import the database/tables.
I'd also recommend testing at regular intervals during development to see if things do work and if not; work out the problems first.
There are currently 1 users browsing this thread. (0 members and 1 guests)