Host a PHP Site in 5 easy steps
Do you know how to host a PHP site? And about what host is better for you? So, let’s see that and other things you have to know about it.
What do I need to host a PHP Site?
The first step to host a PHP site is registering a Domain Name and obtain a Web Hosting Plan of your preference.
Currently, most hosts accept PHP files. But, you should pay attention and check if this is the case with the hosting of your choice.
If you use a system integrated with a Database, like WordPress or others, you should pay attention if this has database support, especially for MySQL Database.
At Copahost we offer several hosting services to meet any needs you need, with PHP and MySQL DataBase support, quality, and safety! We have the best Plans for you! And you can obtain your Domain Name with us too! Come to see our best plans!
After these steps, you will be able to upload files from your website to the Web Hosting Server!
How to host a PHP Site?
In your server, you can put so many files. The files of your Website have to be on the directory: “public_html“. In some servers, this directory has the name: “www“. That is the root directory responsible for your website.
Therefore, you must upload all files from the site to that directory.
If you use WordPress CMS, you can see our tutorial video about how to install WordPress in your web hosting.
How can I upload my site to the server?
You can upload your site in different ways. But, don’t forget, the PHP file responsible for your homepage must have the name “index.php” and be located exactly in the “public_html” directory, not in its subdirectories.
The most part of Web Hostings has an FTP (File Transfer Protocol). So, you can use an FTP client, like the Fillezila, to upload your files to the server.
Another way to upload your files is with SSH (Secure Socket Shell). But, firstly you must verify if your Web Hosting has this service. With SSH you can uncompress a zipped file directly on your server, without need to do that manually.
Another very common way to upload your files to the server is through your Web Hosting Control Panel. Some Hosts use cPanel, DirectAdmin or other known control panels. However, there are also those that use their own panel. Regardless, most allow you to upload files directly through this panel via a file manager.
Finally, how you can see, there is so different way to host your PHP site, choose the one you liked.
How can I upload my site in CopaHost?
CopaHost uses the DirectAdmin Control Panel. So, when you login, you will find a panel like this image:
choose the menu “System Info & Files” and nextly choose the option “File Manager“:
After, you should find the public_html directory. Click on it to go to this directory.
Here you can see your site’s files. Now, click on Upload File, and then, select or grab your PHP files here.
Copahost’s control panel also allows you to edit a PHP file on it, without having to upload files. For that, you should mouse hover on your file, then choose the option “Edit File“:
Now, you can edit your file in this page! To save, just click on the “save” button.
The result of the above code in the browser will be as follows:
What do I do after the upload?
If you have a system with a database, you should see if that is correctly configured. For this, you can access your database from your Control Panel Web Hosting.
After uploading your site in the host and configure your database, you just have to check if this is online!
What Host is better for me?
Firstly, you must verify what is your needs. It is, what configurations your server must have to support your website. That depends on the size of your website, how much access should you have, what type of recourses do you need and so many things. In most cases, a Shared Hosting Simple plan is sufficient. But, for some needs, you must choose other options.
You should pay attention and check if that server has PHP support.
If you will need a DataBase, you should pay attention if this server has database support, especially for MySQL Database. That’s is a recourse necessary for most CMS, like WordPress.
For all of that options, CopaHost has so many Web Hosting plans for you! Take a look, certainly, you will find what you need!