0

I set up wordpress on a small AWS virtual ubuntu machine last night with the most current LAMP stack. It seemed to work last night but I didn't do much after the initial configuration. I did change the theme, but it was to one of the preloaded ones.

This morning, any time I try to load the page it just sits there and spins. It does seem to load the title and subtitle into the browser tab, but that is it. Same when I try to go to administrative pages. If I go to the php info page it comes up without issue.

I've looked at many help sites and they all seem to be regurgitating the same information. I have turned on debug and the debug logs. No error messages or logs are generated. I've been monitoring memory, and while I will eventually need to add more, I don't get above 20% utilization on the system. PHP is set at its default, 128mb. I've reloaded apache and mysql many times and verified the login settings in the wp-config.php are correct.

I at a loss for what to try next.

2
  • 1
    Let’s check if the Apache has the right permissions to write into the debug file. Happens very often. I would check the php log and apache log. – middlelady Oct 10 '19 at 19:41
  • Good advice, already checked. – mreff555 Oct 10 '19 at 19:45
1

I'm answering my own question, since this appears to be a scenario likely to occur, despite the fact that I didn't see it represented on any Wordpress help sites. wordpress.org made mention of the field and thats about it.

In the wp-options table of the wordpress database there are two fields, home and siteurl which must correspond to your public IP address. If your IP is not static or has changed, you will have problems. If you were to, for example, set up your LAMP stack and install wordpress on an AWS instance prior to setting an elastic IP for a domain name, this would get screwed up. The fix:

Log into your mysql account:

mysql -u <username> -p

Get the name of your wordpress database:

SHOW DATABASES;

Set to that database:

USE <wordpress database>

List the fields and confirm they both match your public IP:

SELECT * FROM wp_options WHERE option_name = 'home' OR option_name = 'siteurl';

If the fields do not match, fix them:

UPDATE wp_options SET option_value = 'http://<correct IP address>' WHERE option_name = 'siteurl' OR option_name = 'home';

This fixed the issue for me.

3
  • Nice, you can set the site url and home url directly editing your wp-config.php if that happens again wordpress.org/support/article/changing-the-site-url. – middlelady Oct 10 '19 at 19:48
  • Right, but in this case, nothing was accessible including the administrative page. – mreff555 Oct 10 '19 at 20:39
  • True, but you just need a ssh (or ftp) connection to your instance. – middlelady Oct 10 '19 at 20:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.