Wordpress website not launching properly

0

i'm Launching wordpress website on ec2 using codecommit codepipeline and i have use AWS ALB, Cloudfront. yesterday my website was running perfect but when i started again its not loading properly . my website Image

2 Answers
1

You will need to change your WordPress Site URL from 'http://ec2-52-66-208-248.ap-south-1.compute.amazonaws.com to 'https://d39qozijunn0v9.cloudfront.net (or maybe just /).

You can login to WordPress, go to Settings, General and change the vaues for WordPress Address (URL) and Site Address (URL). The values are stored in wp_options table in your WordPress database

AWS
EXPERT
Mike_L
answered 10 months ago
0

Are there any errors in the web server or PHP logs?
If you are using Apache, I believe the log files are located in "/var/log/httpd", so could you please check and share them with us if there are any errors?

If you are using CloudFront, you may be caching a broken state, so try running a cache clear.
https://repost.aws/knowledge-center/cloudfront-clear-cache

You may also want to make sure that the permissions for WordPress content are set to 755 or something similar, as the content you are loading may not have enough permissions.

profile picture
EXPERT
answered 10 months ago
  • this is my error log

    [Thu Jun 29 10:42:34.340954 2023] [suexec:notice] [pid 4270] AH01232: suEXEC mec hanism enabled (wrapper: /usr/sbin/suexec) [Thu Jun 29 10:42:34.408730 2023] [lbmethod_heartbeat:notice] [pid 4270] AH02282 : No slotmem from mod_heartmonitor [Thu Jun 29 10:42:34.408771 2023] [http2:warn] [pid 4270] AH10034: The mpm modul e (prefork.c) is not supported by mod_http2. The mpm determines how things are p rocessed in your server. HTTP/2 has more demands in this regard and the currentl y selected mpm will just not do. This is an advisory warning. Your server will c ontinue to work, but the HTTP/2 protocol will be inactive. [Thu Jun 29 10:42:34.429858 2023] [mpm_prefork:notice] [pid 4270] AH00163: Apach e/2.4.57 () PHP/7

  • my console is looking like this

    Mixed Content: The page at '<URL>' was loaded over HTTPS, but requested an insecure stylesheet '<URL>'. This request has been blocked; the content must be served over HTTPS. d39qozijunn0v9.cloudfront.net/:1 Mixed Content: The page at 'https://d39qozijunn0v9.cloudfront.net/WordPress/' was loaded over HTTPS, but requested an insecure script 'http://ec2-52-66-208-248.ap-south-1.compute.amazonaws.com/WordPress/wp-includes/js/jquery/jquery.min.js?ver=3.7.0'. This request has been blocked; the content must be served over HTTPS. d39qozijunn0v9.cloudfront.net/:1 Mixed Content: The page at 'https://d39qozijunn0v9.cloudfront.net/WordPress/' was loaded over HTTPS, but requested an insecure script 'http://ec2-52-66-208-248.ap-south-1.compute.amazonaws.com/WordPress/wp-includes/js/jquery/jquery-migrate.min.js?ver=3.4.1'. This request has been blocked; the content must be served over HTTPS. DevTools failed to load source map: Could not load content for chrome-extension://gighmmpiobklfepjocnamgkkbiglidom/browser-polyfill.js.map: System error: net::ERR_FILE_NOT_FOUND d39qozijunn0v9.cloudfront.net/:70 Unchecked runtime.lastError: The message port closed before a response was received. d39qozijunn0v9.cloudfront.net/:70 Unchecked runtime.lastError: The message port closed before a response was received. d39qozijunn0v9.cloudfront.net/:70 Unchecked runtime.lastError: The message port closed before a response was received. d39qozijunn0v9.cloudfront.net/:70 Uncheck

  • Thanks for sharing the log! The WordPress site URL may be wrong. Perhaps you need to change the URL to the CloudFront URL or you will get an error.

  • If you are unable to login to the WordPress admin panel to make changes, please connect to the database and execute the following SQL.

    UPDATE wp_options SET option_value = 'https://https://d39qozijunn0v9.cloudfront.net' where option_name IN ('home', 'siteurl');
    

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