Magento: base_url doesn't get updated after moving to another server - php

I moved a magento project (version 1.9.0.1) from one server to another (lets say from magento.domain.com to magentotest.domain.com). I changed the web/unsecure/base_url and web/secure/base_url in the core_config_data table, I also changed the paths in the local.xml
I deleted everything var/cache, var/session and var/tmp and yet when I try to access magentotest.domain.com I am always redirected to the old page (magentotest.domain.com/admin as well)
I tried to track the problem in the magento code and what I found was that in Mage_Core_Store_Model the URL called with $this->getConfig('web/unsecure/base_url') still contains magento.domain.com - and for the life of me I cannot find out why.
Having googled this for three hours now and what I found was a clue that magento sometimes stores its cache files in the SYSTEM tmp folder. When I looked there I found a folder magento/var/cache but it was empty. I deleted it but to no avail.
I don't know what else to do. Did anyone ever encounter this problem?

seems like mine was a special case: for performance reasons, there was an extension named "redis cache" installed and only when I emptied THAT, it finally worked.

Related

ERROR: The file 'wp-config.php' already exists

I clicked on the 'Update WordPress' link in the admin dashboard of my WordPress site, and I am getting this error:
"The file 'wp-config.php' already exists. If you need to reset any of the
configuration items in this file, please delete it first. You may try installing now."
When I try to click the "installing now" link, it seems that WordPress is installing fresh. I want to keep all of the content of my WordPress installation.
I have tried to change the name of the wp-config.php file but that didn't do anything.
Is just a browser cache.
On first URL load, you are redirected from domain.ext to domain.ext/wp-admin/setup-config.php
If you are on Chrome, just open the developers console, go to "Network" tab. Reload the page and right click anywhere in the console, and hit "Clear browser cache".
Now refresh again and you will see your website
I ran into this same issue while I was transferring a site. The issue ended up being with the .htaccess file. I fixed it by resetting my permalinks. There may be other causes to this issue but this worked for me:
Click on General => Permalinks
Click Save Changes (to reset permalinks)
Try to display the website first on the incognito tab. If it works correctly, clear the browser cache.
Once the page refresh has been completed, the website will appear.
You can use the following shortcuts to clear the browser cache.
Windows: Ctrl + F5
Mac OS: CMD + Shift + R
This usually happens when you use an old version of Wordpress files or old database, and you use partly new files of Wordpress.
All you need to do is to delete all WP files and install a fresh Wordpress (new files unzipped from a new version of Wordpress) and use an empty database.
If you're planning to migrate or move from another website, you should use the export/import function built in wordpress.
he file wp-config.php already exists. If you need to reset any of the configuration items in this file, please delete it first. You may try installing now.
Answer:- Please Clear Your browser's cache.
Did I miss the party?
Today I have a problem like what you experienced 5 years ago. The solution is: Remove all caching plugins (Cloudflare, Jetpack, Litespeed).
Maybe you could try to delete 'wp-config.php' file, or take a backup of this file in different folder and then try again.
If you are using bluehost and did not do the one click install :
I solved this problem by deleting the default error pages 404.php 500.php etc...
I do not know why exactly this was causing this issue... Sorry for the sloppy answer but tried clearing cache and recreating the .htaccess file it didn't work.
I removed the added spaces that the Wordpress's own web 'easy installer' created in the wp-config.php file to help me out.
Guess the Wordpress's own wp-config.php ?checker? isn't compatible with Wordpress's own installer. Wow.
Once the added spaces were removed, site comes up fine. I simply modeled the spacing that is in the wp-config-sample.php file.
Because you just installed wp.
Just hit ctrl+F5 done!!!
More likely it is cache issue and this error comes when we try to install one Wordpress inside of another sub folder of the cpanel in the same Wordpress installation and it will be mostly resolved when you try to check it in the private window or another browser
For me it was file permission set to 666 changing it to 664 worked.
If someone is still for a solution.
This happened to me on an existing site while trying to update.
the problem was following line in wp-config.php near the end.
/** Sets up WordPress vars and included files. */
require_once(ABSPATH . 'wp-admin/setup-config.php');
Removing this fixed the problem.
Hope this helps.
RESOLVED: I had the same problem. post hack situation on other account, shared hosting and server NUKED. Luckily I had the backup files from one of the WP plugins but the main page didnt load, I could only go to 404 and from there to other pages but not main page, the error was wp-config eists...install...blah blah blah.....so I tried everything, multiple re-installs, changed the wp_prefix as per previous install on the fresh install and nothing helped, even ordered paid support from the backup plugin developer as I was sure that it fooked because I had Opencart also installed there but the backup was intended for WP only, my web developer also did something, perhaps removed the OC bits from DB, but thank god i managed to resolve it on my own(and justhost),. so I contacted the justhost for the SECOND TIME and they told me that the account is on VARNISH i.e. some sort of automated cache limit, so I told them to take it off and they wanted to know what have I done to reduce the LOAD to the server, so I told this and that and two seconds later everything loaded perfectly. took me about 20 hours to get main page loading, plus probably it will take 10 hours for fine tuning of the site. anyway if you contact jour host make sure you ask them if they are not blocking cahce as the first time I got in contact they couldnt help me.
I also meet with same error and Mr Pierre R is right its just a cache. Just clear your cache or check in private window. All fine.
if someone have still this error..
goto->admin->setup.php (delete this file error will be solve)
hope this will help.

Magento 302 when accesing installation

I've installed magento countless times and been getting the same error. When trying to access the installation, magento sends a 302 redirect to the first ip it got installed in ( 192.168.10.144 ). I feel like I tried every trick in the book.
there is no /tmp/magento folder on my machine.
deleted several times /var/www/html/magento/var/cache and /var/www/html/magento/var/session
Magento has a default behaviour to auto redirects you to his Base URL.
If you want to change it, open up your Magento DB and in the table core_config_data your old IP 192.168.10.144 should appear as value for the path web/unsecure/base_url and web/secure/base_url.
Just change it to the new IP or URL you want there, then clean your caches again, and voila.
If you just want to reinstall it, just delete all the table and the file app/etc/local.xml and you should be able to run through the install process again.

Wordpress page suddenly blank

I have a WordPress website that's been running for almost two years now. All of a sudden, it started to show a blank page on any public page. The admin part on /wp-admin is still working without any problems.
A http request is successful (status 200), but the returned content is completely empty (not even an tag).
I'm not really a PHP/WP expert. A simple web search got a lot of results, but mostly old stuff and never any clear conclusion of the problem's source, i.e. how to fix it. I already enabled WP_DEBUG in wp-config.php, but this only shows debug messages in wp-admin, but the public page remains blank.
Where should I continue searching?
The problematic website is http://lolkitten.org/.
Update
I just found index.php inside my public_html, which was empty. After writing something into it, it appears on my home page! Also, there's a directory /home/<user>/home/<user>/public_html/ which looks like complete nonsense to me.
Update 2
The Problem solved itself after upgrading to Wordpress 3.8. I don't know why, but it seems like some files (like index.php) were messed up and got replaced by fresh ones in this update.
Possible solution / workaround
I've had this problem again. This time, my index.php was completely empty. In my dashboard, under Dashboard > Updates, I clicked on Re-install Now and it fixed itself.
Most likely the wp-content folder can’t be found. When you login to the admin does it state that the templates can’t be found in red text in the center of the page right when you login?
I recommend going into your wp-config.php and adjust—or add—the following constants:
define('WP_SITEURL', 'http://lolkitten.org');
define('WP_HOME', 'http://lolkitten.org');
define('WP_CONTENT_DIR', '/path/to/your/wp-content');
define('WP_CONTENT_URL', 'http://lolkitten.org/wp-content');
Fairly confident that the key to fixing this will be the WP_CONTENT_DIR setting. You need the full path to the directory in the file system to your wp-content folder. So if you have a standard Unix setup with lolkitten.org in it’s own directory that path would be:
/var/www/lolkitten.org/wp-content
And the WP_CONTENT_DIR value would be:
define('WP_CONTENT_DIR', '/var/www/lolkitten.org/wp-content');
EDIT Adding info on how to determine your script’s absolute path if you do not have SSH access to the server, but have FTP access of some sort. Just FTP to the server & create a test file called test.php and just put the following code in it:
<?php
echo dirname(__FILE__);
?>
Now load that into your browser to get the full path:
http://lolkitten.org/test.php
__FILE__ is a magic constant in PHP that will echo the full/absolute path of a PHP script.
try deactivatinhg all the plugin once.
And if you can not access admin panel do the following to deactivate plugins
In the database - wp_options table
change the entry to a:0:{} on option ID 35- active_plugins
As far as i see error, it is because of share-buttons plugin.
Try removing share-buttons plugin from plugin folder and then check again.
If still problem exists then remove all active plugins and check again.
I too had same issue and it was because of plugin. I deactivated plugins one by one and my site was recovered from crash.

Presta Shop Switching Domain Issue

I have a website made on Presta Shop CMS. I had it on my trial server. The installation and everything. It works and runs fine. I then copied (using FTP) every file from my trial server to the main domain. I did not install it on the main domain (bought from network solutions), but copied everything there.
The issue is when i hit the main domain, it somewhat redirects me back to the trial server. I have checked and changed many of the default values. and many values in the database. But still havent had luck. Also made changes in the .htaccess file, still without any luck.
I do not want to go through the installation process again on my main domain.
You can check the site (main domain :- www.myworld-myhome.com, it will redirect you to hrm.com/esol/ )
As you can read here, the prestashop domain name is stored in the ps_configuration table.
So, to solve your problem, you should run this SQL query:
update ps_configuration
set value='www.myworld-myhome.com'
where name='PS_SHOP_DOMAIN';
You should also edit your config/settings.inc.php file and change:
define('__PS_BASE_URI__', '/esol/');
To:
define('__PS_BASE_URI__', '/');

Magento not using correct DB details

In the process of moving a Magento shop to a new server.
Have copied clean copy of files for Magento 1.5.1, then copied the app/media/shin folders to overwrite the clean ones.
All seems ok, except I am getting PDO permission denied, despite the details in local.xml being 100% correct.
I have wiped the cache folders.
Any ideas?
Sorted, I must have missed something, but wiping the lot and starting over seemed to fix it.
Thanks,
What home page is returning?
Have you changes values in database?
Check this query.
SELECT * FROM core_config_data WHERE path = 'web/unsecure/base_url' OR path = 'web/secure/base_url';
Are you sure you didn't left old information in a local.bak.xml for example ? Magento reads every xml file in /app/etc

Categories