How to host HTML and JavaScript in WordPress

1, Introduction

In this article, I will describe how to host applications are created by HTML and JavaScript in WordPress.

However, if you aren’t beginner, you use Apache or Nginx instead of WordPress.

And more skillful person will use Heroku etc.

In the other word, This is an article for beginners.

Then, let me tell you.

2, How to upload HTML files in WordPress

(1) Summary

First, I will describe how to upload HTML files to WordPress.

I will describe the following items.

  1. Login to WordPress
  2. Upload HTML file from media
  3. Check the URL of uploaded HTML file

(2) Login to WordPress

Well, Can you login to WordPress ?

When you see the screen to write articles in WordPress, you are already login.

Are you ready ?

(3) Upload HTML file

Let’s upload the HTML file.

(A) Click on the media in the dashboard

Click on the media in the dashboard

(B) Click Add New

Click Add New

(C) Click the select file button

Click the select file button

(D) Select file you want to upload

Select file you want to upload

(E) Get angry

For security reasons this file format is not allowed.

(4) If you still want to upload HTML file

I see, I understood why you said can’t upload HTML files.

In this case, we will use FTP.

However, It’s maybe difficult for you.

(A) Installing a plug-in

When searching on the internet, I found an article for uploading HTML files with the use of plugin.

方法2:プラグイン「WP Add Mime Types」を利用する
アップロードの頻度が多い場合は、プラグインを入れてしまうのが簡単でおすすめです。

【WordPress】セキュリティ上の理由によりこのファイル形式は許可されていません。 | SEO白書

Let’s install “WP Add Mime Types”.

(B) Click “Plugin”

Click “Plugin”

(C) Click “Add New”

Click “Add New”

(D) Search “WP Add Mime Types”

Search “WP Add Mime Types”

(E) Click “Install”

Click “Install”

(F) Input connection information

Input connection information

It’s a bit difficult operation, so I’ll supplement it.

When you contracted a rental server, you will be taught the FTP server’s hostname and user name by server corp.

You input that connection information here.

When input is completed, click “Start” button.

Installing

(G) Click “Activate”

Click “Activate”
Activated

(5) Upload HTML file

(A) Operation check of “WP Add Mime Types”

You know as well.

From “media” to “file selection” are the same as described above.

Oh no…

I get an error even if “WP Add Mime Types” is installed.

It is caused by “WP Add Mime Types” not working well.

(B) Fix bug in “WP Add Mime Types”

Click “Settings” and click “Mime Type setting “
Click “Save setting”

If you don’t click “Save setting”, it will be not good.

Now, “WP Add Mime Types” work correctly.

(C) Upload HTML file

Good !

3, How to upload JavaScript files

(1) Allow JavaScript upload

From the dashboard setting, Click on Mime Type setting.

Then write “js = application / javascript” in the additional item.

And click “Save setting”.

Allow JavaScript upload

(2) Upload JavaScript file

Have you finished setting up the plug-in?

Let’s upload JavaScript files from adding new media.

Upload JavaScript file

4, Check address

Let’s click the HTML file etc. uploaded to the media.

You can know the URL from the details of the media file.

When you access this URL, the media file is displayed.

5, Finally

I was surprised that the plugin did not work.

It was good to work.

Yahoo geocities are closed.

So, I brought the HTML game I created in 2011 to this site.

NumberOfTouch

How nostalgic.

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です

CAPTCHA