How To Publish A PHP Website W/ Database

I have a simple php application which lets a user upload a photo and it saves it to the database. Then the database displays the image in a gallery type area. I want to publish this website online. Does anyone know how to publish a php website with a MySQL/PHPADMIN database. Finally, i need to do this at %100 no cost. Totally free.

I have used these guys before and haven’t had any issues.
You upload the files to public_html folder.
You insert the database through phpmyadmin which the host provides.

The process you’re describing is called deployment.

You won’t find any decent web hosting for free, but if you’re wiling to spend $5 a month, check out DigitalOcean. It offers SSH access and a LAMP stack. Definitely worth the money.

Fman, lothop is correct. That site will host you for free. You will be required to display a notice which will be a link to their service. ( Cheap enough cost for free hosting! ) Also, they will limit your site to a small size. That might be an issue if you are uploading a lot of pictures. But, you can set up your site to delete the old ones once you start to fill your upload quota.

Now, Deployment is a “book” term. What you really need is two things. You need a hosting service. And, you need a way to upload you site to the host’s server system. You can do that with any number of free FTP services. A common one is FTPzilla or CuteFTP or FTPpro and many others. The FTP client is set up to connect to your website using FTP (File Transfer Protocol) and you transfer your files to the site whenever you change it.

Easy enough… Oh, remember, you still have to create a domain name for the site and that will cost you $5 to $15 a year. I use to get my domain name’s and usually get them for about $4 to $6 a year.

Hope that helps.

you can learn Php file uploding at

You need a host that supports php, mysql and phpmyadmin. Look for the hosting provider with these features. I would recommend going with cloud hosting instead of shared hosting. If you don’t have sysadmin skills, then you can still host on cloud servers by using PaaS, like Cloudways PHP hosting ( ).

I would also recommend shelling out a few $ a month for a “real” hosting account instead of using sub-par free services.

I would strongly urge you to use revision control, ie GIT through github, gitlab or similar online services. That way you always have a backup of all your work, you can roll back changes if you mess up, and you’re generally much better off - even when not working with someone else. If you are collaborating with someone else then using such a tool is (pretty much) a must.

When you’re using GIT it’s a small task to automatically deploy your code whenever you commit changes to your project. This way you won’t have to mess with any FTP clients, manually updating code, etc. There are plenty of tools available for updating a database together with your code, I suggest you look into “database migrations”.

If you’re serious about the project you could also add testing that run tests for functions/methods to see if your code works as expected. You can then in turn deploy only if the tests are ok, meaning your online app should function even if you commit faulty code.

People, this is a 3 year old post. The OP is long gone. Let this thread rest in peace.

Quite sure the OP isnt the only one who could/should improve the deployment routines ^^

Sponsor our Newsletter | Privacy Policy | Terms of Service