Wordpress Live copy & Xampp with different port - wordpress

So there is this live wordpress-site and I have to make some new adjustments. Therefore I dumped the whole database and copied the files via FTP to my localhost (c:\xampp\htdocs\mycopy).
However I run XAMPP on port 808 and the wp-copy can't deal with this.
http://localhost/mycopy/
404 - Not found
Tried it with
http://localhost:808/mycopy/
301 - moved permanently -> redirects to
http://localhost/mycopy/
and that gives again 404 not found.
Then I found the wp_options table in the database and set the "siteurl" and "home" both to
http://localhost:808/mycopy
Still no change...however I can open
http://localhost:808/xampp/splash.php
with my browser and it`s working like a charme.
Additional note:
http://localhost:808/mycopy/wp-admin/
redirects to www.livepage.de/wp-admin/
What did I miss?

You need to change links in database. WordPress stores full path links in the DB.
Set DB_HOST to "localhost:808" in wp_config.php
Then use this tool to replace urls in the database:
https://interconnectit.com/products/search-and-replace-for-wordpress-databases/
just follow the instructions

I found the prob....and I am as dumb as a brick. httpd.conf has this line
#Listen 12.34.56.78:80
and I changed it to 127.0.0.0.1:808
now take a wild guess what my problem was....But thx for your answers, I appreciate it!

Related

Wordpress website cannot be found after accidentally changing site URL

I changed my Wordpress website site URL prematurely and now it tells me Not found The Requested URL was not found on this server. I've been struggling with this and trying to find a fix but everything I've done has not fixed it. I've gone into the config file to update the URL, define the URL, you name it, I've done it. So I'm pretty desperate at this point and any help would be appreciated.
P.s I'm also running the server off of a Digital Ocean droplet. So I haven't been able to access the DB through MyPhpAdmin.
Thank you!
To change the WordPress site URL you need to do it manually as you can’t do it from your WordPress admin panel. There are two ways to do that:
Method 1 - Change WordPress site URL by editing wp-config.php file. This is the easiest way;
Add the following code to the end of wp-config.php file and save the file.
define('WP_SITEURL', 'http://www.example.com');
define('WP_HOME', ' http://www.example.com');
*Change www.example.com with your site domain.
Method 2 -
Please try to change the URL from PHP MY ADMIN > select your database > goto wp_options and change the URL
Using FTP/ SFTP , or your web-host’s cPanel or whatever file management application your host provides, access phpMyAdmin on your host, then find your DB, there check the wp_options Table (Note: The table prefix of wp_ may be different if you changed it when installing), and make sure site URL field and home field are correct.
I found the fix!!
When the site URL changed so did the root directory. The root directory added another folder to the path. So it looked something like this var/www/html.old/html.
Apache was still trying to access the site through var/www/html.
So I adjusted the file path and boom! Apache was able to make the connection and the website is now showing.
To get to the apache folder it was /etc/apache2/site-available/. I was then able to nano into the 000-default.conf file and adjust the file path through there.

Wordpress:Can't able to access Wordpress after migrate from http to https

I am converting my wordpress site to https from http.I am using aws machine(windows OS) and i got the free ssl certificate,but when i tried to access my site it shows "Forbidden You don't have permission to access / on this server." this error message.I am tried almost all the solution(Deleting htaccess file,plugins uninstall,changing httpd.conf etc) but none of them worked.Any one help me i really need this one.
Can you try to test it by removing htaccess file?
Also from your database phpmyadmin go to wp_options table and from there verify that you have https urls.
Also if it does not works then tru to rename plugins folder and then test it.
Also add Really Simple SSL plugin and test your site.

Changing URL Wordpress- still not working despite checking/editing database

As much as may sound like a broken record - I changed the URLs on my WP site, and now I get a 404.
What I wanted to do:
Change site URL from www.SiteA.com to www.SiteB.com
All WP files were at the time in another directory in the same hosting account. I needed them in the root directory, accessible by www.SiteB.com
What I did:
Backed up locally and remotely - Database and files.
Edited URL's through dashboard on WP - got a login error afterward, but seemed to do it anyway.
Moed ALL old site files from root to backup folder.
Moed ALL wordpress files from original directory to root directory.
Then I got a 404 error and was unable to access WP-admin or login through the new or old URL.
What I tried to fix the issue:
Noticed http should be https - changed this in 'options' within phpmyadmin, both at 'siteurl' and in 'home'.
Still 404
Then I tried defining the db_name in the wp-config file.
Still 404
Then I gae up, changed the URL's back using myphpadmin, and moed the filed back to their original directory. Now I can login to WP as usual and eerything is fine.
Why can't I access the site when I moe it into the root directory - I thought I had all the steps right!
Thanks in adance for any help
oh..and apologies, my keyboard is missing a few keys :(
Wordpress stores url/permalinks on database field values as well, changing only the configuration files will not be enough.
I am pretty sure there are other options, on my case i use often perform Wordpress website migrations, and the following tool becomes really handy when search and replacing domains on the database records.
https://interconnectit.com/products/search-and-replace-for-wordpress-databases/
Hope it helps.
Jose
This happened to be an SSL issue where the host for our SSL certificate was conflicting with the stylesheet somehow. 0_o

Wordpress redirect loop with MAMP pro on local machine

I downloaded a wordpress website to my local machine and set up a host on MAMP Pro with an export of the live database, now I keep hitting a redirect loop on the main page when I try to view the website, it doesn't matter whether I reset the .htaccess file, clear all my cookies, delete my plugins or do any other of the recommended things it keep coming back. The official error is:
This webpage has a redirect loop
ERR_TOO_MANY_REDIRECTS
I had the same issues. Somehow resetting the permalinks settings in the admin panel to plain fixed the problem.
Are you using HTTPS by any chance? If so you may want to add
$_SERVER['HTTPS'] = 'on';
define('FORCE_SSL_ADMIN', true);
To the top of your wp-config.php file.
You might want to also check your database to see if the site url's are correct.
As I was moving from Windows environment to Mac OS probably on the copy files i was missing the install.php file. And when i tried to install the theme it would bring me the redirect loop screen.
It was confusing to me because I was following all steps at the end I went to look for the install.php and saw it was missing there put it in the place and voila!
Maybe will help i don't know, for the next readers to come!
I was able to resolve an identical issue by doing the following:
In the wp_options table of your site's database check if the port numbers for option_name siteurl and home match those of your server. Update them if not.
Remove the port number from $root_dir in wp-config.php
This error occured on an older project running Wordpress 4.1 after changing the ports on my MAMP apache server months earlier. Hope that helps.

Wordpress port redirect error

I tried installing wordpress localy using WAMP - but it seems that some setup is wrong because when I try accesing the http://localhost:1550/wordpress it redirects me to http://localhost:8080/wordpress where I get an error - 404 ERROR!
I don't quite seem to undersand why does this problem seems to occur!
P.S. I've have made all the changes on the apache httpd.conf to listen to 1550 port!
Wordpress has configurations that store the site URL, which it uses to handle redirects. This is stored in the database in a table called wp_options. You'll need to update "siteurl" and "home" to change the port from :8080 to :1550.

Resources