Static HTML page that links to current Wordpress blog - html

So, I currently have a WP blog installed. What I want to do is put a static HTML landing page at the root of the site and then a link to the blog. The HTML landing page does not look similar in theme and everything is hosted under the same domain.
How can I do this with this current structure?
I suppose I would have to somehow move the blog to /blog instead of the root?
Thanks.

Depending on what server you're running, you might not need to do anything. Certain servers, like Apache, have a DirectoryIndex which gives priority to .html files by default. So even if you had index.html and index.php in the same folder, it would load the index.html file.
You could also define the priority in an htaccess file or use the commenter above's suggestion of pasting the HTML into the index.php template and then making a "home" template and telling Wordpress to use that specific page as the homepage.
That being said, I would strongly recommend installing Wordpress in a sub-directory, such as "/blog" as you mentioned. Just as a fail-safe.

Related

How to use the index.html I've designed as the home page of a Wordpress website?

I am designing a portfolio site for a client. I am using Semplice template for Wordpress as it is supposed to be a good theme, but the thing is that is not so customizable as I would like, so I've designed the home page with HTML, CSS and JS on my own, with no templates. So I want to use the index.html I've created only for the home page, and Wordpress+Semplices for the rest of the sections of the website.
Now, I've already uploaded the Wordpress content and database to the host, and it's working. I am uploading my HTML+CSS+JS through the CPanel, but I here comes the problem:
I can upload my files to the root directory of the Wordpress in the public_html folder. If I do it, It keeps using the index.php (which charges the wordpress index, that I don't want), unless I delete this file and leave only the index.html that I've designed, in which case it runs my index but it doesn't loads the rest of the Wordpress even if I write the links to the sections properly. So it looks like this default index.php charges the rest of my wordpress them, and if I delete it, it won'g load anymore.
So, to conclude, I need something that charges both of them, the index.php which will load the rest of the wordpress sections (work, about me, info, etc.) but that uses my index.html as the default home that appears when I write the URL in the browser.
I will show you the files of my public_html folder, just in case it can clarify something for you to help me and understand me better:
By the way, as you can see in the image, I have no .htaccess file in my folder. That's confusing. What's the reason?
The .htaccess file can be not visible, try unhiding it in your File Manager -> Settings -> Show hidden files. If it's still not there, you can create .htaccess file yourself.
After that, it should be an easy redirection with the .htaccess file as this:
RewriteRule ^$ http://example.com/path-to-html.html [L,R=301]

Wordpress website redirects to "index.html" which doesn't exisit

My Wordpress website, www.the-family-historian.net, goes directly to /index.html, which doesn't exist. I have it set in the Wordpress backend so that the landing page is the posts (blog) and not a static page, but this "index.html" seems to be blocking it. Thanks for any help!
Try setting the following at the top of the .htaccess file:
DirectoryIndex index.php
This should force any request to go to index.php first and ignore index.html, not a 301 redirect though.
Using an FTP program, or possibly a web based file manager, view the files that make up your website. Find an option to view "system / hidden files" in order to view the .htaccess file. I suspect you will find a rewrite rule in it pointing to index.html Simply change that to index.php and all should be good.

Having html and wordpress on the same directory

I have a WordPress site with a couple of posts on it. To this site I need to add a few HTML pages (including index.html). I need both of them to work properly.
The home page should be the index.html page, and all its links(HTML pages).
The previous site URL's i.e. WordPress URL's should also work.
I put them together and the index.html page displays as home page, the subpages(HTML) also work fine. Although all WordPress URL's are re-directing to the index.html itself.
Is this possible? How do I make the old WordPress URL's work fine (i.e. not redirect the index.html page)?
When dealing with issues like this, I like to create page templates in Wordpress (with page names like About, Projects, etc.) And then I create a .php file using the slug title of it (so a projects page will correspond to a .php file called 'page-projects.php'
One example being I make a page called 'about', then I create 'page-about.php' in my Wordpress directory. The Wordpress Template Hierarchy will, along the way, look for a .php file called 'page-about.php'
A solution like this is great because those pages are linked through your site, so using /about or /projects will bring you to the proper pages instead of redirecting to the main page (because it redirects to your index when Wordpress can't find any other suitable template to display)

External HTML page and wordpress in same root folder

I got a quick question:
I have a HTML page and my wordpress blog in the root folder due to some technical integration's used in it. What I have done to achieve this:
I simply saved my HTML page as "index.html" and put in the root folder that holds the Wordpress "index.php" file. The "index.html" automatically was granted a higher status and opened as my home page.
My question:
How this affects my SEO?
How my sitemap is affected by that?
Since I use SEO plugin by Yoast, this plugin builds my sitemap but I am not sure that it will include my homepage.
I am opened to your interactions and suggestions.
Thanks in advance.

How to link to a wordpress blog from a static page in a single host computer?

I have a introduction page that is totally html and a blog based on Wordpress. I aim to link my log from the Static page and vice a versa. Is it possible to host both of those pages ina single host by linking each other. If it is, how?
Yes; if you're using Apache, you can set the html page to be served by default using .htaccess:
DirectoryIndex index.html index.php
will ensure that the html file is read before Wordpress's index.php. In the html file you can add a simple link, and in WP you can add arbitrary URLs using custom menus, that will enable you to link back to the introduction page.