Page not found on localhost WordPress site - wordpress

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

Related

Can't access wordpress, not even through cpanel

So, I'm making this wordpress website.
I've got full access to the entire cPanel.
I install wordpress, and the domain is always redirecting me to this stupid page.
Here you have the public_html folder.
And when I try to access the Wordpress Admin panel through cPanel, it gives me this random link and redirects me back the page I meantioned earlier.
Any help?

WordPress navbar links wont work after i migrated from localhost to a live server

I migrated my WordPress site from localhost to a live server and my navigation links don't work.
I have tried the velvet blues update url plugin and nothing has changed.
I also can't find the .htaccess file on my server in the file manager. My links keep redirect me to localhost rather than the live site.
How do I update all of my localhost URLs to point to the live URLs?
I've had such a problem before and now use Duplicator plugin for migration. If you migrated manually, then go to your online database (once imported) table wp_options and change the links to your new domain.
You can reveal the .htaccess file from your cPanel settings as below
setings change
Go to File Manager (Files Section)
Click the top-right Settings button.
Then on the Preferences window, check the option Show Hidden Files (dotfiles)
Confirm the action by clicking the Save button.
Now you will see all hidden files (including .htaccess files) in File Manager.
Hope this helps 🙂

Wordpress redirecting to wrong homepage

I worked for a few days on XAMPP with a wordpress platform. After I bought a domain, I decided to use Duplicator plugin to transfer my whole wordpress snap to the new server. Everything is working just fine except for one single thing: whenever I go to my website, instead of visiting the actual page that should be "www.example.com/welcome" it redirects automatically to "www.example.com/wordpress". I made some research about it and discovered that usually wp is installed in a wordpress directory, but I completely made sure that:
on htaccess there is no /wordpress directory url
on index.php there is no /wordpress directory url
on wp-config there is no /wordpress directory both on SITE-URL and HOME
made sure that on the wp-admin config panel in the General section, the URLs are both set to the root directory.
For some unexplicable reason, everything is working fine, www.example.com/shop works for example, but if I set from the customization panel a page like "www.example.com/dummy" as homepage, then THAT page won't be found because it automatically redirects "dummy" to "/wordpress" which of course does not exist. You can type www.example.com and be redirected to www.example.com/wordpress and the same thing happens if you type www.example.com/dummy, since now that should be the homepage.
Can anyone explain me why is this happening? I searched everywhere but I can't find an answer.
I'm using the Storefront theme and Woocommerce plugin if that might help.

Moving Wordpress site subdirectory errors

I have just moved my testing development subdirectory worpdress installation to my root folder using the WP-Clone plugin.
The problem now is my main site (previously mysite.com ) shows (mysite.com/site) now. and the subdirectory is shwoing in all my links
I have tried going to settings and removed the /site from wordpress URL and Site address URL.
But it broke my site and disabled me from accessing my wp-login.php .
I fixed it by editing my wp-config.php and adding :
define('WP_HOME','https://mysite.com/site');
define('WP_SITEURL','https://mysite.com/site');
and now my website works perfectly. But it still shows mysite.com/site and i am unable to edit my URL and Siteaddress from my wp dashboard anymore.
How do I Remove my website subdirectory (/site) and still have it work and not break my site's themes and all? How do I go about this? Really really appreciate any help! Thanks!
By adding those constants to wp-config.php you're overruling any setting in the database. That's why you can't edit them in the admin panel.
So the first step is to change those constants to:
define('WP_HOME','https://domain.com');
define('WP_SITEURL','https://domain.com');
Then delete your htaccess file. (.htaccess in your root folder).
Once you've done this navigate to http://domain.com/wp-login.php
Login to your site and go to Settings -> Permalinks. Hit save which will regenerate your htaccess file.
Finally you'll need to update existing links. I'd suggest installing a plugin called 'Velvet Blues Update URLs'.

WordPress on add-on domain

I have installed WordPress on an add-on on BlueHost. The addon domain is linked to a sub-folder of the main domain FTP, called addondomain-folder.
When I go to addondomain.com, the WP site displays ok.
The problem is with the wp-admin panel. The panel displays incorrectly, has broken links to all images and stylesheets and I can not access any area as I always get redirected to: addondomain.com/addondomain-folder/wp-admin/... instead of addondomain.com/wp-admin/
I have checked the wp-options table in the database and both siteurl and home are set to addondomain.com
Any solutions to stop wp-admin thinking it is in a subfolder?
Ok, the problem was a hidden .htaccess file which messed everything up.

Resources