Reverting the WordPress site name to localhost - wordpress

I am a WordPress beginner and in the dashboard, under Settings --> General I changed WordPress address (URL) to http://a.com and Site Address (URL) also to http://a.com just in the curiosity to try the feature unknowing of the fact that it will lock me out.
I am using xampp for a localhost environment.

The canonical article to resolve this problem is on the WordPress website.
If you have a local copy of the website, you can edit your wp-config.php file and upload it to the site. Or, if you have SSH access to your site you can use a curses-based text editor such as Nano to make the necessary amendments remotely.
You need to override the domain settings you have made, and you can do so using this code:
define('WP_HOME','http://example.com');
define('WP_SITEURL','http://example.com');
Upload this file if necessary, and then refresh your admin screen. You may have to log in again. Once you get access to your control panel, fix your incorrect settings. You can then revert the changes to your wp-config.php file.

Related

WordPress Visit Site is pointing to another URL

I am trying to repair a WordPress installation. I almost have it running now, but there is a strange issue.
In the admin dashboard there is an option in the upper menu to open the site, Visit Site.
When clicking this menu option, the browser opens another folder from the server, not the folder where WordPress is installed.
I have tried several options to solve the issue:
Adding
define('WP_HOME','https://yourdomain.com');
define('WP_SITEURL','https://yourdomain.com');
at the end of wp-config.php file. Of course changin yourdomain.com for the current domain.
Checking the database entries for siteurl and home in options table.
Checking inside Settings->General settings for WordPress Address and Site Address
Is there another way to get the reason for the issue?
I think there are a few other factors you are missing to mention in your question. I would add checking the server setup for that domain. Is it cPanel or Plesk? Take a look at what the domain is supposed to be vs what path is WP installed.
Other possibilities might be:
Server's cache
Your .htaccess file
Permalinks (disable and enable)

Page not found on localhost WordPress site

I am working on a WordPress website on localhost using Xampp. Today I changed the site URL and home URL in phpMyAdmin to a host; I plan on transferring my site too, but I ran into some issues so I had to revert it back to localhost.
But now it doesn't work! I have tried 'localhost' and 'localhost/wordpress'. With the latter, I can see my site's header and footer and theme colors etc., but the main frontpage says "not found" and other menu pages also say not found. When I try to access wp-admin, it can't find it either! So I can't even log into the admin panel.
Folders structure:
C:/xampp/htdocs/wordpress
Inside the wordpress folder, there's .htaccess, index.php, etc. And three folders: wp-admin, wp-content and wp-includes.
I don't know why this isn't working any more, I only changed my database's site URL temporarily! Now nothing works and can't access admin panel.
make sure you changed the siteurl and home values in the wp_options table to your localhost like that http://localhost/site
delete the htaccess file and try to open the site and see
if you have a security plugin that changes the login url page try to disable it by renaming it's folder name

Website is not accessible after force SSL

I have a big problem with a website I edited for a client.
My client said he enabled his free SSL from his host. I installed a force https plugin on his wordpress installation. After that, I edited the address to https instead of http (In general settings).
Now I can't access the website or the wp Login. Apparently the SSL wasn't activated.
This is the error I receive : ERR_SSL_UNRECOGNIZED_NAME_ALERT
Is there a way to either change the website address (from the settings) or disable the plugin?
To disable a plugin:
Using FTP, go to wp-content/plugins/, find the https plugin folder and rename it to something else it.
For change in general settings:
You could try to add the following code in wp-config.php file:
define('WP_HOME','http://example.com');
define('WP_SITEURL','http://example.com');
Another way is to change those values directly in the database. Here is one article that shows how to do that.

Wordpress links pointing to the wrong domain

In wordpress, how can I change where the links are pointing to without changing the server name or adding redirection?
My main site is a rails app at www.example.com.
I have the wordpress blog on a separate server at blog.example.com/blog
I have a reverse proxy on the primary (rails) server that takes any url that ends in /blog/ and then serves up the blog content. (That's all behind the scenes -- the user never sees the blog.example.com domain)
Currently, I can access the blog via the reverse proxy at www.example.com/blog, but the problem is that the urls on the blog point to blog.example.com/blog (wrong) instead of www.example.com/blog (right).
I've tried changing the urls in wp-config.php, but whenever I change those it breaks something.
I eventually figured it out. Here's what I did.
1) Got rid of the Bitnami wordpress image (on Amazon) and reinstalled wordpress fresh, from scratch, on EC2. Bitnami had a bunch of magic behind the scenes that was making it hard for me to figure out what was going on.
2) Via wordpress admin changed Site Address (URL) from http://blog.example.com/blog to http://www.example.com/blog Previously, I had been changing this in the wp-config.php file, but I am pretty sure that doesn't do the same thing. So I needed to change it in wordpress admin. However I needed to keep the Wordpress Address the same. Found out that the Site Address governs the urls displayed in the theme, whereas the Wordpress Address is the server hostname. I'm using a reverse proxy which is why this was confusing.
3) To enable pretty permalinks behind the reverse proxy I changed the permalink settings in wordpress admin, then I updated .htaccess according to its instructions, then I modified /etc/apache2/sites-enabled/000-default changing AllowOverride None to AllowOverride All. Need to do this to enable mod_rewrite to work on virtual hosts.
Go to wp-admin - settings, and change site url. Than flush permalinks by resaving settings.
You don't really provide a mountain of information. But you will need to check this area of your dashboard
http://www.steveovens.com/wp-content/uploads/2011/09/wpid209-Check__Force_HTTPS_in_site_address__Wordpress_address.png
to make sure the information is
http://54.235.249.193/blog/
In both fields.
If you still have issues try changing your permalink setting to a new setting save it and then change it back again and save.
http://www.webmikesites.com/wp-content/uploads/2013/09/permalink-settings.png
If you are unable to access the dashboard of the site on the address
http://54.235.249.193/blog/wp-login.php
As it redirects you to the other domain.
Then you need to likely change the two fields mentioned earlier siteaddress and wordpressaddress via the database. Find the table in your database wp_options or yourtableprefix_options and edit the fields option_value where the option_name is siteurl and home to have the address
http://54.235.249.193/blog/
Also if you are just starting using a webserver. You may need to make sure your files are writable by the webserver.

WordPress Installation transferred to Localhost issue

Maybe this is not a pure programming question.
I moved a copy of the wordpress installation from the webhost and put into my localhost.
And then I opened the web page from the localhost. when I hit the button of Login to Wordpress admin panel, I expect the path would
http://localhost
but I got
http://www.mywebhost.com/
I don't where I have to changed on the files so everything in the Wordpress would not pointed to my localhost instead of the webhost
Read the official Moving Wordpress article, it says some steps you need to do when migrating the site like going to the Administration → Settings → General and update the values of Site address (URL) and WordPress Address (URL) to the correct domain.
If it doesn't work, you'll need to replace the content of the DB to the new domain.

Resources