skip to Main Content

The title basically says it. I currently have my home page with the HTML sitting in the classic editor box. Should I move that to front-page.php? I know that it doesn’t REALLY matter, and it won’t have a huge impact, but I am being meticulous about creating a speedy website. So which is faster?

Also, I am currently using 2 separate PHP files for headers. One on the home page, and one for the rest. Should I just hard code the header for the home page into the same place as the home page HTML since it’s the only page that uses it?

I’m pretty new to PHP, but I’ve searched Google extensively and can’t seem to find my answer. Using WordPress. Really appreciate your help!

2

Answers


  1. For speeding up the website, no need to change the home page or the header file. please do the following things for speeding up the website

    1. Optimise your images
    2. Enable caching
    3. Enable GZIP compression
    4. Minify CSS, HTML & JS files
    5. Update plugins
    6. Clean-up your database
    Login or Signup to reply.
  2. Moving the html code to a template file will improve the site speed because WordPress will not have to retrieve those html tags from the database. And it is conventional and actually a good practice to place all rendering code (html, css, js) to the template or theme files where they should be, instead of directly adding them in the backend or instead of including them directly in the post editor.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search