Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

205
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda