how to post static files alongside wordpress installation that uses the same domain as the wordpress site


i am running a wordpress instance on lightsail with static ip and am pointing my domain to this. the wordpress works. i want to be able to sftp upload files to a static directory that has the same domain. my wordpress has thousands of existing url links to files in a directory (and subsidiary directories, e.g., i learned that i cannot create a directory 'earthquakes' within htdocs. i created a directory in htdocs, but when i enter that url, the browser just shows my wordpress site. can i use sftp to create a subdirectory in my lightsail space or do i need to create a separate instance where i can place these files. files i want to post include jpg/pngs, pdfs, and other files (e.g., *.docx, .xlsx, .zip, etc.). do i use a "bucket?" the key thing is that wherever i place these files, they need to have the ability to be found at e.g., thanks in advance for your kind assistance.

profile picture
asked 2 years ago735 views
2 Answers
Accepted Answer


To view the static content in a directory at , you can create a directory 'earthquakes' in the APPNAME folder.

For example, consider an Amazon Lightsail instance with WordPress blueprint, having domain name 'domain-name.tld' configured for its static IP. By default, Application files are stored in the /opt/bitnami/APPNAME/ directory. The configuration file for the Apache Web server is stored in the /opt/bitnami/apache2/conf/ directory. Here, APPNAME will be 'wordpress' as this is Lightsail instance of WordPress blueprint.

Suppose you want to make a directory 'test' containing static content that should be accessible at 'domain-name.tld/test', you should create the directory at /opt/bitnami/wordpress/test location. You can create a 'index.html' file in /opt/bitnami/wordpress/test directory, and that page will be accessible at 'domain-name.tld/test' URL.

You can understand more about the default directory structure here -

If the suggestions above do not help resolve the issue, we might need to troubleshoot based on your configurations. Could you please create a support case instead so we may discuss details on your resource configurations?

Please do not post any sensitive information over re:Post since this is a public platform.

As always, feel free to reach back with any further questions or concerns in the meantime!

answered 2 years ago
profile picture
reviewed a year ago
  • omg. thank you!!! i will try that tonight after work. i have been struggling about this. i will follow up when it works! thank you!!!

  • YOU ARE MY HERO!!!! it worked! thank you so very much for helping me. i have spent several days trying to figure this out. and, this is just my hobby, an education and outreach program at now i can upload all the files so that my wordpress posts point to without needing to edit the links (i migrated my wordpress install from a different hosting company when they deleted all my files without any warning). thank you again, be well!


But, I think that these pages will not be able to be positioned in Google.

If you use the Google Chrome inspector and look in the "Headers" - "Response Headers" section, it indicates that the page is only "text/html" the "charset=UTF-8" part is missing.

And the "charset=UTF-8" tells the crawler how the page is created, if it doesn't have this part it simply doesn't understand the text on the page.

How do you add the "charset=UTF-8" in the "Response Headers"? and the "content-language:" part? (which is also important).

I hope you can answer this question, I would really appreciate it.

answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions