Search code examples
wordpresssubdirectory

Including a wordpress blog as a subfolder


So I have a weird problem here, I have created a website with HTML, CSS, and JavaScript but I have it as a PHP file so I can interact with a Wordpress blog I have also created. I have the WordPress blog in a folder inside my website eg. mywebsite/blog. Now while developing on localhost, everything works pretty fine but when I finally hosted it on a live server, the blog seems to load without the CSS; here's a link to the blog https://www.dexafxacademy.com/blog. At this point, I am lost as this is my first time, including Wordpress as a subfolder, so I don't have an idea of what the problem could be. Note that this works well in my localhost.


Solution

  • Thanks for providing a link to your site!

    Using the Web Inspector in Chrome, I see that the problem is likely in your WordPress settings.

    enter image description here

    • WP is attempting to load all your assets from https://dexafxacademy/blog
    • The correct URL would be https://dexafxacademy.com/blog

    In the WordPress admin of your production site (not local), head to Settings > General and make sure your WordPress Address and Site Address fields have the correct URL containing .com.