Wordpress keeps redirecting to install-php after migration

WordpressMigrationInstallationRelocation

Wordpress Problem Overview


Here's my situation. I have followed the exact instructions on wordpress codex page about moving a site to another server. Here are the step's i have taken.

  1. Export a copy of my database
  2. Make a new database in the new server
  3. Import the database I exported earlier
  4. Upload a copy of my Wordpress files via Ftp
  5. Use this script to change all my local url's to new one's
  6. Make changes to my wp-config.php file according to the new server(I did not forget table prefix. Although it has some uppercase characters in it )

And then when I try to open my site on the new location it just directs me to wp-admin/install.php Now just to make the scenario clearer: The destination folder(on live server) is a sub directori in a public_html folder which already has another wordpress install inside it(I'm saying this just in case it should matter)

My .htaccess looks like this

    # BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /subDirectoryName/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /subDirectoryName/index.php [L]
</IfModule>

# END WordPress

I have tried checking and repairing my tables via phpMyadmin but everything seems to be ok there and has no effect on the problem.

I also tried emptying the database on the live server and go through with the install. And it installs with no problems and everything works fine but, well I have no use for another clean install. But I think this at least rules out any trouble with wp-config file. I'm using Wordpress Version 3.3.1

So I guess the big question I'm left with is: Why isn't wordpress recognizing my Install after migration?

Any help much appreciated!

Wordpress Solutions


Solution 1 - Wordpress

Well finally I have solved the problem. And surprise, surprise It was the freaking UPPERCASE letter in my table prefix. I had it this way in my wp-config file wp_C5n but for some reason most of the tables got a prefix wp_c5n. But not all. So what id did was I changed my table prefix in wp_config file to all lowercase and then went through all the tables by hand via phpMyadmin to see If there's any uppercase tables left. There where about 3. They were inside usermeta table and inside options table. Now finally everything is working. Did a quick search through wordpress codex but did not find anything mentioning not to use uppercase characters.

Solution 2 - Wordpress

Resolved: wp-config.php setting

I had a similar problem. I got the install.php after moving files and creating a new database. It seems the install screen shows up it there is problem finding the correct database tables.

I fixed the problem by changing the following settings to be correct:

// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', 'HikeforLife_dev11');

/** MySQL database username */
define('DB_USER', 'HikeforLife_dev11');

$table_prefix  = 'wphk_';

Solution 3 - Wordpress

I experienced the same issue as the OP - Wordpress keeps redirecting to install-php after migration.

Problem was my database tables are named as prefix_tablename and I missed the underscore from $table_prefix in wp-config.

$table_prefix = 'myprefix';

should have been

$table_prefix = 'myprefix_';

Solution 4 - Wordpress

I would check two things:

  • First, I would check the url that is configured in the database. Check the wp_options table and the values of the "siteurl" and "home" options, it is possible that you need to update them if your domain has changed.

  • Another option is that your Apache server could not get the .htaccess. Check if the "AllowOverride" option is "all" in the httpd.conf file.

I hope it helps.

Solution 5 - Wordpress

I experienced a similar issue. None of the suggestions above helped me, though.

Eventually I realized that the Wordpress MySQL-user on my production environment had not been assigned sufficient privileges.

Solution 6 - Wordpress

As I was trying to install server setup to localhost, I have configured the config file as well as DB in local host- I was redirected to the install.php.

wp

Check:1 Go to yourTableName_options Move to 'option_id'- '1' Change 'yousite url' to 'localhost/youLocalSiteFolderName'

Move to 'option_id' - '37' Change homw value to 'localhost/youLocalSiteFolderName'

Check:2 Move to 'wp_config' file check : $table_prefix = 'yourNew_Prefix_';

Hope it will help

Solution 7 - Wordpress

Don't forget also the table prefixes if you installation don't use the default prefix.

Solution 8 - Wordpress

This happened to me after I copy migrated an existing website to WP Engine and forgot to do one thing required by WP Engine:

Update the WordPress core installation of the site that is being copied to the latest version.

So here was the problem then:

My old site that I was copying from another server to WP Engine had version 4.0. However, when you copy an existing site to WP Engine, you don't copy the WordPress core files, you only copy the contents of wp-content and the state (or snapshot) of the existing database. So the state of the database for my existing site was for an installation running WP 4.0. Nevertheless, when you create a new WordPress install on WP Engine, that install is created with the latest version of WordPress, which, at the time happened to be version 4.0.1, so that means the core files on the destination (WP Engine) were for a 4.0.1 installation but the database snapshot I was gonna import into WP Engine was for version 4.0. So when I overwrote the default WP Engine database with the import of the copy the database of my old site, I got the redirection error to the install script.

So to fix it, I just logged into the WordPress admin site of the site on WP Engine, made sure to reset the file permissions (by clicking the blue button), which, you sometimes have to do on WP Engine, and then re-installed the WordPress core, which, basically updates your database so that internally the db state was for a WordPress 4.0.1 install and the core files also match the version.

Took me a while to figure out what was going on.

Solution 9 - Wordpress

I had the same problem and I fixed it by changing the database user privileges to full read & write.

Solution 10 - Wordpress

I experienced this issue today and started searching on internet. In my case there was no table in my DB. I forgot to import the tables on the online server. I did it and all works fine.

Solution 11 - Wordpress

It seems that in general, this happens when Wordpress doesn't find the site information in the expected places (tables) in the database. It thinks no site has been created yet, so it starts going through the installation process.

This situation means that:

  1. Wordpress WAS ABLE to connect to a database. If it didn't, it would say there was an error and refuse to install or do anything else

AND

  1. it didn't find the things it was looking for in the expected places in the database it connected to.

Just to be clear, both 1) and 2) are happening when you see this symptom.

Possible causes:

  • Wrong database. You're working on several projects and you copied and pasted wrong database name, database host, or table prefix to the wp-config file. So now, you're unwittingly destroying ANOTHER client's website while agonizing over why isn't THIS website working at all.

  • Wrong database prefix. You can put several Wordpress sites in one database by using different prefixes for each. Make sure the tables in the database have the same prefixes as you entered in your wp-config. So, if wp-config says: $table_prefix = 'wp_'; Check that the tables in your database are called "wp_options", etc. and not "WP_options", "mysite_options" or something like that.

  • The data in the database is corrupted. Maybe you messed up while importing the sql dump, you imported a truncated file, a file belonging to some other project, or whatever.

Solution 12 - Wordpress

I tried all of these solutions before I realized that I had enabled opcache in PHP on my live environment. Wordpress was not reading a cached version of wp-config.

Solution 13 - Wordpress

I got this problem when I used br tag in single product page of woocommerce. I was trying to edit the template that suddenly everything ... . that was a nightmare. My customer could kill me. try not to use this br tag anywhere.

Solution 14 - Wordpress

There can be many causes to this problem.

My suggestion is to turn on WP_DEBUG in wp-config.php

define('WP_DEBUG', true);

Solution 15 - Wordpress

This happens due to the following issues:

  1. Missing Files
  2. Database Connection Details Problem
  3. Site URL Issue
  4. .htaccess File Issue
  5. Webserver Failure
  6. Resources Blocked by Plugin
  7. Query Limit Exceeded
  8. Insufficient Database Privileges
  9. PHP Extensions

Reference: https://www.scratchcode.io/wordpress-keeps-redirecting-to-wp-admin-install-php/

Solution 16 - Wordpress

In my case I had made a post on my website and added the post link to a button. Later I updated the post's title and link but kept the old link for the button which led to this error.

To solve this: I went to the database from my dashboard, found a table named wp_posts and deleted recent entries of my posts.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionHiiloView Question on Stackoverflow
Solution 1 - WordpressHiiloView Answer on Stackoverflow
Solution 2 - WordpressWebProView Answer on Stackoverflow
Solution 3 - Wordpresschris.dempseyView Answer on Stackoverflow
Solution 4 - WordpressBeltranView Answer on Stackoverflow
Solution 5 - WordpresszkwskView Answer on Stackoverflow
Solution 6 - WordpressRanView Answer on Stackoverflow
Solution 7 - WordpressMartin TonevView Answer on Stackoverflow
Solution 8 - Wordpressracl101View Answer on Stackoverflow
Solution 9 - WordpressSpacerView Answer on Stackoverflow
Solution 10 - WordpressDOUMBIA MamadouView Answer on Stackoverflow
Solution 11 - WordpresseltomitoView Answer on Stackoverflow
Solution 12 - WordpressAndyView Answer on Stackoverflow
Solution 13 - WordpressMohsen35View Answer on Stackoverflow
Solution 14 - WordpressPaul VerschoorView Answer on Stackoverflow
Solution 15 - WordpressMayank DudakiyaView Answer on Stackoverflow
Solution 16 - WordpressShardul BirjeView Answer on Stackoverflow