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

0

i am running a wordpress instance on lightsail with static ip and am pointing my domain earthjay.com 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 earthjay.com/earthquakes (and subsidiary directories, e.g., earthjay.com/earthquakes/20220914_norcal). i learned that i cannot create a directory 'earthquakes' within htdocs. i created a directory in htdocs, but when i enter that url earthjay.com/earthquakes, 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., earthjay.com/earthquakes/. thanks in advance for your kind assistance.

profile picture
gefragt vor 2 Jahren713 Aufrufe
2 Antworten
1
Akzeptierte Antwort

Hello,

To view the static content in a directory at earthjay.com/earthquakes , 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 - https://docs.bitnami.com/aws/faq/get-started/understand-directory-structure/

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!

AWS
Pooja_M
beantwortet vor 2 Jahren
profile picture
EXPERTE
überprüft vor 10 Monaten
  • 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 earthjay.com. 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!

0

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.

beantwortet vor einem Jahr

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen