When a WordPress site managed by XSERVER is migrated to AWS, it can no longer be entered into the administration screen.
The domain is also changing.
The management screen is located at /wp-login.php.
Target domain: nakazawakan.com
∟ Server: xserver
∟ Domain: Your name.com
Destination domain: sample-program.xyz
∟Server: AWS
∟Domain: xdomain
After moving the WordPress site, the lower page was not displayed.
Due to the work done below, the lower page is now displayed.
However, it is not in the management screen.
The error details are summarized in 1 and the work done is summarized in 2.
1. Error detailsDisplayed screen, web server error log
1-1. [About sample-progra.xyz/wp-login.php screen]The following is displayed.
If i check with Linux, the following will be displayed.
[root @ ip-10-0-1-10 httpd] # tail -f error_log
[Wed Nov 20 18: 11: 19.198109 2019] [so: warn] [pid 3789] AH01574: module rewrite_module is already loaded, skipping
[Wed Nov 20 18: 11: 19.200736 2019] [lbmethod_heartbeat: notice] [pid 3789] AH02282: No slotmem from mod_heartmonitor
[Wed Nov 20 18: 11: 19.200769 2019] [http2: warn] [pid 3789] AH10034: The mpm module (prefork.c) is not supported by mod_http2. The mpm determines how things are processed in your server. has more demands in this regard and the currently selected mpm will just not do.This is an advisory warning.Your server will continue to work, but the HTTP/2 protocol will be in active.
[Wed Nov 20 18: 11: 19.200775 2019] [http2: warn] [pid 3789] AH02951: mod_ssl does not seem to be enabled
PHP Warning: PHP Startup: Unable to load dynamic library 'mysqli.so' (tried: /usr/lib64/php/modules/mysqli.so (/usr/lib64/php/modules/mysqli.so: undefined symbol: mysqlnd_global_stats) , /usr/lib64/php/modules/mysqli.so.so (/usr/lib64/php/modules/mysqli.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0PHP Warning: Module 'mbstring' already loaded in Unknown on line 0
[Wed Nov 20 18: 11: 19.222266 2019] [mpm_prefork: notice] [pid 3789] AH00163: Apache/2.4.41 () PHP/7.2.24 configured-resuming normal operations
[Wed Nov 20 18: 11: 19.222288 2019] [core: notice] [pid 3789] AH00094: Command line: '/ usr/sbin/httpd -D FOREGROUND'
[Wed Nov 20 23: 55: 12.760725 2019] [php7: warn] [pid 3836] [client 93.174.93.114:26425] PHP Warning: require_once (./ scribing/phpQuery-onefile.php): failed to open stream: No such file or directory in /var/www/html/test.php on line 3
[Wed Nov 20 23: 55: 12.760785 2019] [php7: error] [pid 3836] [client 93.174.93.114:26425] PHP Fatal error: require_once (): Failed opening required './scribing/phpQuery-onefile.php' (include_path = '.:/usr/share/pear:/usr/share/php') in /var/www/html/test.php on line 3
1-3. Debug mode
define ('WP_DEBUG', true);
After changing the above, the following error is displayed on the top page.
Therefore, we removed the plugin for accelerated-mobile-page.
Notice: Undefined index: ampforwp-homepage-on-off-support in /var/www/html/wp-content/plugins/accelerated-mobile-pages/templates/features.php on line 5577
Notice: Undefined index: ampforwp-homepage-on-off-support in /var/www/html/wp-content/plugins/accelerated-mobile-pages/templates/features.php on line 5577
Notice: Undefined index: ampforwp-homepage-on-off-support in /var/www/html/wp-content/plugins/accelerated-mobile-pages/templates/features.php on line 5577
Notice: Undefined index: ampforwp-homepage-on-off-support in /var/www/html/wp-content/plugins/accelerated-mobile-pages/templates/features.php on line 5577
Notice: Undefined index: ampforwp-homepage-on-off-support in /var/www/html/wp-content/plugins/accelerated-mobile-pages/templates/features.php on line 5577
Notice: Undefined index: ampforwp-homepage-on-off-support in /var/www/html/wp-content/plugins/accelerated-mobile-pages/templates/features.php on line 5577
2.Try it
2-1. httpd.conf edit
sudo vim /etc/httpd/conf/httpd.conf
Before change: AllowOverride None
After change: AllowOverride All
LoadModule rewrite_module modules/mod_rewrite.so
/var/www/html/.htaccess
# BEGIN WordPress
<IfModule mod_rewrite.c>RewriteEngine On
RewriteBase/cd
RewriteRule ^ index \ .php $-[L]
RewriteCond% {REQUEST_FILENAME}! -F
RewriteCond% {REQUEST_FILENAME}! -D
RewriteRule. /Index.php [L]
</IfModule>
# END WordPress
2-3. Add code to wp-config.php
/var/www/html/wp-config.php
define ('WP_SITEURL', 'https: //sample-program.xyz/');
define ('WP_HOME', 'https: //sample-program.xyz/');
2-4. Database and file path correction
UPDATE wp_options SET option_value = REPLACE (option_value, "nakazawakan.com", "sample-program.xyz");
UPDATE wp_posts SET post_content = REPLACE (post_content, "nakazawakan.com", "sample-program.xyz");
UPDATE wp_posts SET guid = REPLACE (guid, "nakazawakan.com", "sample-program.xyz");
UPDATE wp_postmeta SET meta_value = REPLACE (meta_value, "nakazawakan.com", "sample-program.xyz");
grep -l 'nakazawakan.com' all files | xargs sed -i.bak -e 's/nakazawakan.com/sample-program.xyz/g'
sudo chown ec2-user.ec2-user -R/var/www/html
sudo chmod + w -R/var/www/html
sudo systemctl restart httpd
-
Answer # 1
Related articles
- amazon ec2 - how to put a wordpress environment on aws ec-2
- amazon ec2 - about wordpress server via aws bastion server
- amazon ec2 - how to send an email from the wordpress inquiry form set up on aws
- amazon ec2 - wordpress built on ec2 cannot be made into a unique domain
- amazon ec2 - unable to ssh connection to ec2
- amazon ec2 - ec2: security group setting in launch template
- amazon ec2 - i don't understand the difference between ec2 for docker and aws
- amazon ec2 - screen transition error occurs only in rails production environment
- amazon ec2 - circleci ssh connection error net :: ssh :: connectiontimeout (sshkit :: runner :: executeerror)
- amazon ec2 - i want to transfer a file on macos to an ec2 instance using scp
- aws - aws ec2 shellscript
- amazon ec2 - ec2 instances cannot be accessed from a browser with their own domain name
- amazon ec2 - i want to install python-devel on ec2
- amazon ec2 - want to know aws 情報 ebs volume information
- amazon ec2 - i want to launch postfix on ec2 on aws and make it a mail server i can't send mail
- amazon ec2 - i want to edit credentialsymlenc file from within ec2 instance
- amazon ec2 - about aws public dns
- amazon ec2 - how to organize ec2 and rds
- amazon ec2 - unicorn does not start in rails app
- amazon ec2 - aws ec2 amazon linux yum not working
- javascript - i want to eliminate the full calender not being displayed when deploying on aws
- mysql - [aws] [wordpress] redirect loop when http communication is performed to the document root
- amazon ec2 - lost connection occurs when trying to send mail with postfix from ec2 on aws
- amazon ec2 - i want to upload a directory containing html etc to ec2 and display it
- i want to eliminate the error when connecting to mysql on ec2 from sequel pro
- amazon ec2 - flask application cannot be deployed with elastic beanstalk
- amazon ec2 - i want to build a site with a domain service that does not have an alias function such as ec2 + rds + cloudfront +
- i don't understand the need for a web server such as nginx when deploying ruby on rails applications on ec2
- aws - adding the access-control-allow-origin header does not resolve the cors error
- amazon ec2 - about ebs charges
There was a description "Cause of redirect loop", so it was fixed after adding the following code to wp-config.php!
I just got another plug-in error, but
Thank you for everything!