Claus
Claus

Reputation: 5742

Wordpress Admin page not working properly

I have deployed WordPress on EC2 with the MySQL database running on Amazon RDS.

The homepage gets displayed correctly but when I try to login into the admin panel, I get an error.

Here the sequence of steps:

  1. I go to http://{ec2-ip-address}/wp-login.php
  2. I insert username and password
  3. I get redirected to http://{ec2-ip-address}/{ec2-ip-address}/wp-admin/ with an error message "Not Found - The requested URL was not found on this server."
  4. If I change the address to http://{ec2-ip-address}/wp-admin/ (removing the duplication) I can enter the admin panel but the CSS seems broken (see the attached screenshot)

enter image description here

Looking around I have found a couple of post advising to:

  1. Edit wp-confing.php
  2. Add define('WP_HOME','https://{ec2-ip-address}'); define('WP_SITEURL','https://{ec2-ip-address}');
  3. Restart apache with sudo service httpd restart

I tried that too but I get the same result.

EDIT: The browser shows the following errors:

(index):43 GET http://{my-ec2-ip}/wp-admin/{my-ec2-ip}/wp-admin/load-scripts.php?c=1&load%5Bchunk_0%5D=jquery-core,utils&ver=5.5.1 net::ERR_ABORTED 404 (Not Found) (index):522 GET http://{my-ec2-ip}/wp-admin/{my-ec2-ip}/wp-admin/load-scripts.php?c=1&load%5Bchunk_0%5D=hoverIntent&ver=5.5.1 net::ERR_ABORTED 404 (Not Found) (index):36 GET http://{my-ec2-ip}/wp-admin/{my-ec2-ip}/wp-includes/js/wp-emoji-release.min.js?ver=5.5.1 net::ERR_ABORTED 404 (Not Found) d @ (index):36 (anonymous) @ (index):36 (anonymous) @ (index):36 (index):522 GET http://{my-ec2-ip}/wp-admin/{my-ec2-ip}/wp-admin/load-scripts.php?c=1&load%5Bchunk_0%5D=hoverIntent&ver=5.5.1 net::ERR_ABORTED 404 (Not Found) common.min.js?ver=5.5.1:2 Uncaught ReferenceError: jQuery is not defined at common.min.js?ver=5.5.1:2 (anonymous) @ common.min.js?ver=5.5.1:2 wp-util.min.js?ver=5.5.1:2 Uncaught ReferenceError: jQuery is not defined at wp-util.min.js?ver=5.5.1:2 (anonymous) @ wp-util.min.js?ver=5.5.1:2 site-health.min.js?ver=5.5.1:2 Uncaught ReferenceError: jQuery is not defined

Now if you check the first line in the error you will notice the duplication:

http://{my-ec2-ip}/wp-admin/{my-ec2-ip}/wp-admin/load-scripts.php?c=1&load%5Bchunk_0%5D=jquery-core,utils&ver=5.5.1

Not sure why it's happening

Upvotes: 0

Views: 1013

Answers (1)

pghf
pghf

Reputation: 36

put this codes in wp-config

define( 'CONCATENATE_SCRIPTS', false );

Upvotes: 2

Related Questions