I've just moved a WordPress website from my local machine to the server. All the normal steps were done, such as updating the SQL database and setting it all up. The only problem is the homepage is 301 redirecting to my local URL even though it has the correct URL to go to. The rest of the website is fine including the admin area. So far I've done the following:
Checked the SQL database to look for any localhost URL's
Defined the wp_home and wp_siteurl in the wp-config file
Also defined it in the functions file
Disabled caching
Flushed the permalinks
Disabled plugins
Checked for hardcoded URL's in the PHP
Deleted the .htaccess file and created a brand new one
Any further ideas please?
The solution to the problem was just browser caching, just needed to load it in a different browser which was cache free
Related
I have a WordPress website at https://newable.xyz which is fine, if I go to https://newable.xyz/wp-admin I get redirected to https://newable.co.uk/money/financewp-admin.
This is definitely a 301 redirect.
I've tried the following things:
Deleting the redirecting plugin and all of its data
Clearing my browser cache
Using multiple different browsers
Using InPrivate/ Incognito
Using a fresh .htaccess file
Am I missing something obvious?
try search in your active WP theme - wp_redirect or wp_safe_redirect
_search in the theme to see if there is a wp_redirect or wp_safe_redirect as Vasyl said
_deactivate all plugins, both default and mu (a.k.a. mu-plugins) and analyse which one is causing you problems (if there is one that creates conflicts or creates the redirect).
_Try looking in the htaccess file (mod rewrite) of the root, every folder can have its own htaccess. You can have more than one .htaccess file on your hosting account, but each directory or folder can only have one, pay attention.
_Try to see if there is a server configuration (many hosting services have the ability to put a redirect to another domain)
-Delete the wordpress package in case it has been polluted with some injected code and download and reupload it.
After a few days of looking around and trying, I do not seem any closer to the solution.
I am running a nginx + WordPress site off of one of my machines. I recently bought a domain name through domain.com. Currently I have my external IP set as both the site and WordPress URL. This works alright but if i try to connect to my domain name and subsequently click on any page of my website, the domain name in the url will be replaced by my external IP. However if I exchange the site and WordPress URL for my domain name (http://domain.xyz) my main page will infinitely reload and my admin panel will no longer be accessible.
How do i achieve the expected site behavior of http://domain.xyz/url, as opposed to http://XX.XXX.XXX.XXX/url ?
thanks for any info you can provide!
I think that there's a wrong URL anywhere in the WordPress configs, so here are a few ideas of what could be the issue and how to solve it:
WP Options
Check for the correct URL in your database. In the table, wp_options, are 2 entries (siteurl and home) with the URL. Make sure that option_value is equal to your path, in your example http://domain.xyz/url.
WordPress Permalinks
If you moved from one domain to another or the directory of WordPress changed, try to reload the Permalink Structure: /wp-admin/ -> Settings -> Permalinks -> Save
SSL, www.
Also, make sure you have the correct URL entered. For example, if you're using SSL, don't use http://example.com/url but https://example.com/url.
Same thing for the www. subdomain if you're using it (or any other subdomain).
I just migrated a Wordpress website to another hosting and domain.
After migration, I'm not able to update pages.
Below is the link of the error I get, when I try to update the page.
I have already increased the memory limit to 512MB and the corrupted htaccess file is also renamed.
It looks like you have placed your .htaccess file in wp-admin folder? Wordpress requires you to keep that in the root folder which is used to redirect post.php. When you access would-admin url it must be opening, while on submit the htaccess is redirecting.
If this is not the case, please share the contents of your htaccess.
I have installed WAMP and set up a local version of my live Wordpress site, however only the admin area and homepage work.
I have done / tried the following things, as suggested in similar questions, but the issue persists:
Changed siteurl in wp_options in phpMyAdmin to http://localhost/mysite
Changed home in wp_options in phpMyAdmin http://localhost/mysite
Updated wp-config to have the correct database login credentials
Ensure URLs in Settings - Permalinks in Wordpress begin with http://localhost/mysite
Clicked 'Save Changes' in Settings - Permalinks from the Wordpress backend
Accessed from a browser that doesn't automatically redirect to https://localhost/mysite (which Chrome was doing)
Toggled RewriteModule on in Apache Services in WAMP
Restarted all services on WAMP
Changed all instances of AllowOverride none to AllowOverride all in httpd.conf in WAMP
Restarted all services on WAMP again
Clicked 'Save Changes' in Settings - Permalins from the Wordpress backend again
On Firefox Private Browsing, any page except wp-admin/* and /mysite redirect to https://localhost, which gives an error message.
I have managed to stop the redirect to HTTPS, but the pages still don't work. In this case I'm presented with a butchered version of the localhost homepage.
Any advice on getting this sorted would be hugely appreciated.
EDIT
Images of two issues I am encountering.
Firstly, I get a butchered version of the localhost homepage when the browser does not redirect to https, and I follow a link from the functional homepage to another URLs (http://localhost/mysite/example) which functions on the live version:
On Firefox where it redirects to https I get the following error message:
I fixed this after a bunch of increasingly experimental tinkering.
The thing that solved the issue was deleting the htaccess file, visiting Settings - Permalinks, and hitting Save Changes. This created a new htaccess file which has allowed me access to all URLs on the site.
I have also faced the same issue. I have saved the 'settings->permalinks' page. it didn't solved my problem. Later I deactivated all the plugins one by one and I found the problem lied with one of my plugins.
I tried migrating my wordpress from xampp to a web server. Changed the site fields in the sql database, exported the database, updated wp-config, set permissions and uploaded the page.
The front page loads fine and I can access the admin page through /wp-admin (where everything functions) but any page request that isn't an actual file (like /admin) results in error 500.
I'm not sure how those work in PHP anyways. Is there some configuration I missed maybe? I also have access to php.ini if that helps.
Since I moved the deployment from /wordpress/ to htdocs root, I also had to edit the .htaccess file to change rewrite path.