Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

206
Views
How to create & access environment variables in WordPress project (with Divi plugin) resident on AWS LightSail

I am building a Wordpress site with Divi plugin and the project is hosted in an AWS Lightsail environment.

My ultimate goal is to make my Wordpress project use different environment variables in both testing and production environments. A button should contain a link to a different website based on the environment.

I have tried using the file wp-config.php, but I cannot get JavaScript to consume this file's environment variables (I have tried with process.env.[the name of the variable] and with other built-in functions of Wordpress and none worked).

Would you know how to do that? Should be straightforward. Thanks in advance!

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

The solution was quite simple. The file wp-config.php is not used to this end. You only have to follow the steps in: https://webdeasy.de/en/wordpress-php-variables-javascript/

It seems to be another way of passing variables, also defined directly on the Wordpress server.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!