Having trouble putting my HTML5 game to my Wordpress website

greglevygreglevy Member, PRO Posts: 85

Hi,

I'm having trouble putting my HTML5 game on my website. I published my game and received the zip file, which I opened up. I the followed the steps in the video by "The Guru"

https://www.youtube.com/watch?v=v_D1Q2wFzzg&t=1136s

I've uploaded the files to a new folder on my ftp. But everytime I update my site I'm unable to get my game to appear. I checked to make sure my website is the same as my Bluehost ftp (https://).


Any suggestions or ideas what I can do.


Thanks

Greg

Comments

  • ArmellineArmelline Member, PRO Posts: 5,397

    Could you elaborate on what you mean by "unable to get your game to appear?" Also, what path did you upload it to, and what path are you putting in your browser to try to load it?

  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772

    For some odd reason I posted this in the wrong post originally... :)

    As a test I just posted a project to my Wordpress site and it works fine: http://jamie-cross.net/Space_Shooter/

    I downloaded the zip file from the publishing portal. Un-zipped it, renamed the 'sampe-index.html' file to 'index.html' and uploaded the folder to my Wordpress directory.

    Are you trying to do something different?

  • greglevygreglevy Member, PRO Posts: 85

    Hi


    Could you elaborate on what you mean by "unable to get your game to appear?" 

    This is what appears on my page: Page cannot be found

    <iframe src="https://nolapens.com/game/sample-index.html" width="568" height="320" style="border: none;"></iframe>


     Also, what path did you upload it to, and what path are you putting in your browser to try to load it?

    I first went into Filezilla and into my ftp for my website. Then made a new directory named "game". I then copied all of the contents of the Gamesalad unzipped folder to the new directory named "game". Next, I opened sample-frame.html with an editor and copied:

    <iframe src="sample-index.html" width="568" height="320" style="border: none;"></iframe>

    The I added my website to the beginning of "sample-index.html" as shown above.

    I then pasted this into my webpage and published it. When I go to my webpage it shows that the page cannot be found.


    Thanks

    Greg

  • greglevygreglevy Member, PRO Posts: 85

    Hi Jamie,

    I see you are putting your folder in the WordPress Directory instead of making a new directory. What if I want to put my games on a seperate page as opposed to the front page?


    Thanks

    Greg

  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772

    Hi, I've re-done it as an iFrame and it's working as well.

    Make sure when you are putting "<iframe src="sample-index.html" width="568" height="320" style="border: none;"></iframe>" this into your Wordpress back-end that you select the 'text' option instead of the 'visual'. See the screen shot.


  • greglevygreglevy Member, PRO Posts: 85

    Hi Jamie,


    Still getting "page not found"

    Here is my code: <iframe src="https://www.nolapens.com/tangrams/sample-index.html" width="568" height="320" style="border: none;"></iframe>

    Where did you put your folder "Space_Shooter"? Is it in a new directory folder in your ftp?


    Thanks for all of your help!

    Greg

  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772

    When you put in the direct path, like you have it, it should work fine as long as the uploaded folder is actually at that URL. I don't think your URL is correct. I tried to view a file that is supposed to be in the 'images' folder and it's not there. This is the path I tried "https://www.nolapens.com/tangrams/images/gse-loading.png".

    I don't know what your URL should be of course, but if you put in a direct path to a file that is actually there, it should work fine. As a test, use my URL that you can find above, and it should load my game into your page since it is a direct path.

  • adent42adent42 Key Master, Head Chef, Executive Chef, Member, PRO Posts: 3,223

    So it depends on how WP is setup. Some host lock down stuff well so that content like that can only be served from wp-content.

    The other (more likely) think to check is permissions. Make sure your files have read permissions for whoever the server user is. If you're safe is reasonably small and unlikely to be hacked, make the files readable globally and see if it works. If it does, then go back and check the permissions for other files uploaded into wp-content and make sure it matches thoses.

  • greglevygreglevy Member, PRO Posts: 85

    Hi

    I finally got it to work.

    I would like to thank "jamie_c" and "adent42" and "armelline"for their help.

    Here's what I did.

    1. Put the unzipped HTML5 folder in public_html/wp-content on my ftp.
    2. Used http://www.nolapens.com/wp-content/tangrams/sample-index.html

    The key was to put the folder in wp-content

    Thanks again

    Greg

  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772
    edited April 2020

    @greglevy, awesome! Glad to hear you got it working. I'll have to remember that tip, I've never run in to that problem.

  • adent42adent42 Key Master, Head Chef, Executive Chef, Member, PRO Posts: 3,223

    @jamie_c yah, it's something that depends on how much security the host puts in. A self install or a VPS install will usually allow you to put stuff anywhere. A well locked down larger scale host will often only let you drop assets in the wp-content folder.

Sign In or Register to comment.