Im trying to host a wordpress blog off of an Amazon EC2 server instance and it was working fine, however when I associated it a new IP address all of the CSS for wordpress went away and i cant access any of the backend php scripts and get a 404 when i add the /wp-admin to try to access the backend navigation.
Does anyone know how to resove these issues and tell wordpress to use this new IP address?
During the initial installation, did you host the blog such as
http://192.xyz.xy.123/ ?
If yes, take an sql dump of database, search and replace old ip with the new ip.
Restore dump. And everything will be restored.
Related
we have installed the WordPress in a vpn server without internet, after that exported the WordPress file there using all in one wp migration plugin. Now we have to access the server using public IP with internet but we are unable. Even we have changed the private ip with public ip in wp-config.php and in database wp_options table also. still the server and /wp-admin is not accessible over internet.
Is there anything that need to be done here or I am making any mistake?
Rename temporarily security related plugins, if installed
Check your .htaccess file
Make sure if you renamed the wp-admin URL using any plugin
Please post error message or screenshot, URL here
Are you able to access home page and any other pages.
I currently have wordpress installed on EC2 instance with an elastic IP. I have route 53 setup for an existing domain with a type A record set pointing to the elastic IP.
When I access the domain name in my browser, some of the web resources (js, css files) being loaded by the browser still point to the old public dns (ec2-x-xx-xx-xxx.<zone>.compute.amazonaws.com), so they fail to load and the site does not fully loaded. How do I fix this?
I found the solution here. Under the section 'Help! My Public DNS Name Changed and now my Blog is Broken'.
The reason I was having this issue in the first place was because I switched my EC2 IP to elasticIP after I installed and setup wordpress. So wordpress had the old IP in its installation. If I had setup the elasticIP before installing wordpress I would not have had this issue. But the above the link helped me solve it.
I've been having trouble accessing my local wordpress project on different network. The site just keeps loading, and I can't even access the admin panel. I inspected the net panel. It's showing this IP instead of 'localhost' or my real local IP. Since I'm new to wordpress I would like to hear some solutions to this problem.
EDIT: The problem was in the Database. That IP was stored in options table.
I used interconnectit to change the '192.168.0.12' to 'localhost' and I can confirm that it works now.
To run wordpress on your local pc you should have a server installed, for example wamp server.
If this step is fine, make sure that you are masking correctly localhost with this ip at hosts file (C:\Windows\System32\drivers\etc).
Finally, if you are moving wordpress from another location, make sure that all db records (especially on wp_options table) have the url changed.
For sharing project hosted localhost over network, you can use Ngrok
I'm trying to set up Wordpress with Multisite, and the first thing I'm trying to do after getting the Bitnami AMI running on an EC2 host is assign an Elastic IP. However, as soon as I assign this, I'm unable to get to my Wordpress login page due to redirect issues.
When I try to go to my new URL of http://ec2-xx-xx-xx-xx.us-west-2.compute.amazonaws.com, I get redirected to http://ec2-xx-xx-xx-xx.us-west-2.compute.amazonaws.com/wp-signup.php?new=ec2-xx-xx-xx-xx.us-west-2.compute.amazonaws.com, with a redirect loop error shown by my browser. (The IP address, noted with x's, is the same in all 3 cases).
Also, as expected, my apache access_log spits out 20 of the following lines when I try to access my site:
[05/Jun/2016:19:56:41 +0000] "GET /wp-signup.php?new=ec2-xx-xx-xx-xx.us-west-2.compute.amazonaws.com HTTP/1.1" 302 -
Things that do work
Before I assign the Elastic IP, I can access the Wordpress site from http://ec2-yy-yy-yy-yy.us-west-2.compute.amazonaws.com, as long as I dont make any changes to the site URL after spinning up the EC2 instance with the Bitnami Wordpress AMI.
After assigning the Elastic IP, I can SSH into the EC2 instance with both the new IP and the corresponding *.compute.amazonaws.com hostname.
Things I tried
Following these steps, I've...
Updated DOMAIN_CURRENT_SITE in my wp-config.php, as well as updated site_url and home to match the new hostname.
Added WP_HOME and WP_SITEURL to my wp-config.php
Added the RELOCATE flag
None of those appear to fix the redirection issue.
Aha - I found another link that states migrating a Multisite setup is a bit more involved, and requires searching through all database tables for any references to the old hostname:
http://codex.wordpress.org/Moving_WordPress
Searching through all the tables in phpmyadmin... I did find some more references! After updating all of these, I can now get to my site using the new Elastic IP.
Bitnami stacks come with a tool to automatically configure the machine IP of the installation. In the case of WordPress, you just need to SSH into your machine and execute the following command:
sudo /opt/bitnami/apps/wordpress/bnconfig --machine_hostname NEW_DOMAIN
Hope it helps.
So, I got Wordpress installed and working just fine. I can access the site and the wp-admin via the public DNS that I get from the instance.
However, once I create an elastic IP and associate it with the instance, I can no longer access wp-admin and the home page style sheets and JavaScript files are not loaded.
I am attempting to access the site and the wp-admin using the new public IP from the elastic IP. Same thing is true if I try to use the public DNS from either the elastic IP or the EC2 instance.
When I view the page source I see that the reason things aren't loaded is because the URL for all of the assets (.css, .js. etc,) is pointing to the bold public DNS
When I disassociate the elastic IP things do not go back to working again.
I'm missing something but don't know what.
Any help would be appreciated
Your wordpress admin is already associated with your publicDNS. This is because, when you have logged-in the wp-admin console, you have created a new admin user. This information with respect to your publicDNS was saved in the mysql db. So you won't be able to access wp-admin from the elastic IP.
What you can do ?
You can log-in to your wordpress mysql and update all the references of the publicDNS to Elastic IP. Once it is done, you will be able to access the wp-admin from the static IP.
I run into the same problem. A quick fix is to hardcode your site URL into the wp-config.php which you can edit via FTP.
define('WP_HOME','http://yoursite.com');
define('WP_SITEURL','http://yoursite.com');
Worked fine for me.
See also https://codex.wordpress.org/Changing_The_Site_URL for guideline.
I too faced the same issue, followed the steps in this page to get my issue fixed.
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/hosting-wordpress.html
Follow steps under this section:
"Help! My Public DNS Name Changed and now my Blog is Broken"
Pasting it here for quick reference: Login via ssh to your ec2 instance then run the below commands:
Download the wp-cli with the following command
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
Search and replace the old site URL in your WordPress installation with the following command. Substitute the old and new site URLs for your EC2 instance and the path to your WordPress installation (usually /var/www/html or /var/www/html/blog)
php wp-cli.phar search-replace 'old_site_url' 'new_site_url' --path=/path/to/wordpress/installation --skip-columns=guid