Hosting a dynamic website built without PHP and MySQL

I have a dynamic website built without PHP and MySQL. The data resides in separate array structures within the individual ‘.html’ (in case of sub pages) and within separate ‘.js’ files (for the index page) and are linked to each other.

The folder/file structure is something like below:

index.html

js (folder)

  1. indexmain.js
  2. file1.js
  3. file2.js, etc… (json arrays for main page within the .js files)

css (folder)

  1. maincssfile.css
  2. subpages.css

SubPages (Folder)

  1. Page1.html
  2. Page2.html
  3. Page3.html
  4. etc…

(The ‘json arrays’ data for each of the ‘sub-pages’ resides within the html pages themselves).

The website works perfectly fine on the localhost using ‘xampp’. However now when I need to load it on a host machine like ‘godaddy.com’. Will it still work smoothly or will I face issues with the structure I am using? Can I manage and update my site data without sql and php?

Looking forward to your inputs.

as far as i know, it should work smoothly

most web hosts let you update your site’s web folders and files directly, many using a product called cPanel

i used to run my web site on ColdFusion and MySQL, but the hosting costs eventually got to me, and there’s no way i could have rewritten the .cfm files into .php files, no way at all

so i exported the html out of my database, moved to a new host, created individual html files, and now do my updates via cPanel

1 Like

For static websites you can avoid the unnecessary performance expenses associated with physical hardware by using a CDN (content delivery network) to host the site. Github even offers FREE hosting for static websites. Gitlab also offers free hosting for static websites. I myself host some personal projects using s3 amazons CDN. There is absolutely no need for a physical server or apache when hosting static html and javascript that will only run in the client. It’s only going to make everything slower when compared to a CDN that replicates content automatically over a large network of virtual machines. Prior to CDNs perfectly fine given the limited options but now with the cloud there so many more ways to do things and simplify performant scalable infrastructure. I absolutely love the ease of tossing things on a CDN rather than a clunky godaddy server that is being shared by a bunch of sites with limited scaling capabilities or opportunities. In my opinion its pretty much a no-brainer to use a CDN for static content and that can include entire websites.

2 Likes

Try searching for ”free hosting”, register, upload your scripts and report back with your results.

Can you recommend any simple and free CDN sites that I can experiment before committing to a paid scheme?

I’ve tried the free, one Gb, Cloudinary.com option without success and will hopefully create a Topic detailing the problems I experienced in trying to install their comprehensive API.

1 Like

Google has adopted the GitHub AmpProject and there are many large corporations enjoying the benefits of free CDN and preferential SEO for mobile users. I’ve built a couple of sites and impressed with the web page rendering speed.

1 Like

I’ve used Cloudinary in the past. There are going to be some learning curves associated with using any cloud solutions. I think the advantages of utilizing cloud services and gaining that knowledge far exceed the learning investment. I don’t think anything on the market rivals AWS cloud solutions. I stand by AWS not only because of quality but also the marketability of the learning AWS cloud. So in regards to a specific CDN I would recommend s3. You can run a lot of stuff on AWS for basically free. I believe the first 12 months for most services are free to use.

2 Likes

Thank you, @r937 and others!! This was useful feedback! From what I understand, the only issues I am likely to face is securing my data? Is there anyway to secure the files without using sql?

Is a site without a database not a “static” site (or at least semi static)? Static sites are more secure than dynamic sites AFAIK.

Modern trend is to only have an index.PHP file in the document_root and to include all other sensitive files which are located above the document_root.

Special note:
Included files do not include images, or CSS and JavaScript files. I believe they are always viewable and maybe at risk.

1 Like

What exactly is there to be secured?

JavaScript files that are being accessed on the client are going to be available to all. If there is data in those files that needs to be restricted to certain users you are going to require an authentication system. There are several robust free/low cost options in that area. The two I have used are Auth0 and AWS cognito. Both those services use OAuth2 which is the modern standard protocol. As for other security concerns you will need to purchase a security cert so that your site data is encryted via https. The vendors I mentioned above like aws, github, gitlab provide free certs when using their services.

1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.