I’ve purchased a domain name, where I plan to add a content.
I want these things:
google analytics
wordpress or any CMS where I’ve to code minimal(I prefer to write in markdown)
I want to host it. I’ve a spare laptop, as well as I’ve heard that you can host using blogspot, cloudflare and github. What’s the most professional but free way to host it. Since, there’s no guarentee that this will make money, I don’t want to spend money on this. I just purchased the domain name because it was too good to not consider.
You could maybe try wordpress.com, but they may charge a fee if you’re using your own domain name. You won’t be able to host WordPress at places like GitHub.
Cloudflare Pages and GitHub Pages are free for static websites but WordPress is not static. Also if the website is considered a business then they would want you to pay. You might be able to get by with a static website if your business is not yet profitable but I am only speculating. If you can use a static website initially then you might be able to find hosting for less but if you are getting any kind of payment then you probably need to expect to pay at least a little.
Markdown can definitely be used for a static website. The HTML can be generated from Markdown and used for the static website.
I am using free hosting at AwardSpace and at InfinityFree but I am not using WordPress and not using my own domains.
I see both say they provide free hosting for WordPress and I understand both would allow you to use your existing domain name.
It would be up to you to investigate the limitations of their free hosting. A limitation that I have found on at least one of them is that form submission data cannot be forwarded via PHP to email addresses (at least not to email addresses on another domains). You may also find server response times to be rather slow.
I don’t know whether they support Google Analytics. Anyway in my personal view Google Analytics provides virtually no useful information.
You can find reviews of other providers of free hosting.
Adding Analytics is usually just a case of adding the appropriate tags to your pages, I presume WP has facilty to do that. Though you will also neeed to verify ownership, which is done by adding a DNS record or uploading a file.
I imagine that is to avoid it being used for email spoofing/phishing scams and spam. Perhaps it will work if you use SMTP in PHPMailer to connect to your email account. Not sure if WP supports this though.
As others have pointed out, we might need to know more about your project. If you just want a simple wordpress site, then just look for a free PHP hosting service that has MySQL. Then you should be able to install WP on it given it meets the requirements.
A few notes on other comments… @ralphm is correct about using wordpress.com, but you have to have the paid service ($10/month) to use your own domain. For that price you might be able to find a cheap host somewhere that gives more. @m_hutley is also correct in that you are not going to find something good, fast and cheap. If a platform is good at what they do, they are going to charge something for it. If you are testing out an idea, I would suggest you save up enough to buy a host for a few months and give your idea a test run for viability.
Another option you might want to explore is that AWS offers micro EC2 instances (750 hours per month) for 12 months free. It is part of their free tier. Same with their RDS service which is also 750 hours per month for 12 months free. That will give you enough to get the idea off the ground I think.