Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

212
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda