Can I upload a test journal in OJS from localhost?

Hi. I want to know, if I want to upload a test journal in my OJS, do I have to upload my OJS to web server first and only then I can upload the journal? Or can I upload the test journal on OJS in localhost?

If you have a way to spin up a local server on your workstation, then you can create a test installation (or copy an existing installation) to your localhost. This is commonly done with tools like XAMPP, VirtualBox, or Docker.

See this recent thread on how to copy an installation from one host to another:

Note, though, that if you do a lot of work in your testing environment that you then want to copy to your production server, this may be difficult. For example, it is currently easy to export and import articles, issues, and users, but not journal or plugin settings. You would need to manually re-do the changes in your production install after testing them on localhost, in many cases.