How can I import a site into Local by Flywheel


#22

Is it supposed to take forever? I have let it go for about an hour or so and it is still adding(moving files). I have my zip structured the way it says but I am using the full site instead of just the content. The site is only 160MB though. Why would it be taking so long? There were no errors when checking the archive


#23

Hi,
I’m able to import a site from a .zip file but it doesnt works. Admin and View site buttons shows me “Internal Server Error”.

Can you help me?


#24

Hi Guilherme,

Please go to the wp-config.php in app/public and add define('WP_DEBUG', true); above That's all, stop editing! Happy blogging.

If you see another WP_DEBUG set to false you can simply change it to true

This should provide some more info than an internal server error.

For more info you can also browse to the logs folder in the site folder and look in the PHP error logs.


#25

Hi Clay,
I found this in Apache error log:

[Fri Jun 02 18:54:18.148746 2017] [mpm_event:notice] [pid 364:tid 140434530805632] AH00489: Apache/2.4.10 (Debian) configured – resuming normal operations
[Fri Jun 02 18:54:18.403042 2017] [core:notice] [pid 364:tid 140434530805632] AH00094: Command line: ‘/usr/sbin/apache2’
[Fri Jun 02 18:55:33.825607 2017] [core:alert] [pid 367:tid 140434440595200] [client 172.17.0.1:45510] /app/public/.htaccess: Invalid command ‘php_value’, perhaps misspelled or defined by a module not included in the server configuration
[Fri Jun 02 18:55:34.095303 2017] [core:alert] [pid 367:tid 140434357614336] [client 172.17.0.1:45514] /app/public/.htaccess: Invalid command ‘php_value’, perhaps misspelled or defined by a module not included in the server configuration, referer: http://dominewp.dev/
[Fri Jun 02 18:55:46.237670 2017] [core:alert] [pid 367:tid 140434349221632] [client 172.17.0.1:45518] /app/public/.htaccess: Invalid command ‘php_value’, perhaps misspelled or defined by a module not included in the server configuration
[Fri Jun 02 18:56:05.724197 2017] [core:alert] [pid 367:tid 140434340828928] [client 172.17.0.1:45522] /app/public/.htaccess: Invalid command ‘php_value’, perhaps misspelled or defined by a module not included in the server configuration
[Fri Jun 02 19:11:33.408140 2017] [core:alert] [pid 367:tid 140434332436224] [client 172.17.0.1:45526] /app/public/.htaccess: Invalid command ‘php_value’, perhaps misspelled or defined by a module not included in the server configuration
[Fri Jun 02 19:12:13.060022 2017] [core:alert] [pid 367:tid 140434324043520] [client 172.17.0.1:45530] /app/public/.htaccess: Invalid command ‘php_value’, perhaps misspelled or defined by a module not included in the server configuration
[Fri Jun 02 19:12:13.702775 2017] [core:alert] [pid 367:tid 140434315650816] [client 172.17.0.1:45534] /app/public/.htaccess: Invalid command ‘php_value’, perhaps misspelled or defined by a module not included in the server configuration, referer: http://dominewp.dev/
[Fri Jun 02 19:23:48.973369 2017] [core:alert] [pid 367:tid 140434307258112] [client 172.17.0.1:45638] /app/public/.htaccess: Invalid command ‘php_value’, perhaps misspelled or defined by a module not included in the server configuration
[Fri Jun 02 19:24:21.443704 2017] [mpm_event:notice] [pid 494:tid 139717428799360] AH00489: Apache/2.4.10 (Debian) configured – resuming normal operations
[Fri Jun 02 19:24:21.443883 2017] [core:notice] [pid 494:tid 139717428799360] AH00094: Command line: ‘/usr/sbin/apache2’
[Fri Jun 02 19:25:30.037459 2017] [core:alert] [pid 498:tid 139717338588928] [client 172.17.0.1:45642] /app/public/.htaccess: Invalid command ‘php_value’, perhaps misspelled or defined by a module not included in the server configuration
[Fri Jun 02 19:28:36.197847 2017] [core:alert] [pid 498:tid 139717330196224] [client 172.17.0.1:45646] /app/public/.htaccess: Invalid command ‘php_value’, perhaps misspelled or defined by a module not included in the server configuration


#26

Aha! Good find :slight_smile:

If you browse to app/public and then open up .htaccess and remove or comment out the php_value lines you should be set.

.htaccess is hidden so you’ll need to open it with an editor that allows you to see hidden files like Atom or Sublime Text (or whatever you prefer).


#27

It shows me this:

( ! ) Warning: Unknown: failed to open stream: No such file or directory in Unknown on line 0

( ! ) Fatal error: Unknown: Failed opening required ‘/home/domiqtvw/public_html/wordfence-waf.php’ (include_path=’.:’) in Unknown on line 0


#28

There’s probably a block of code in .htaccess surrounded by # Wordfence WAF. I would remove everything in that block.

Wordfence should automatically re-add it and correct for the new environment if necessary.


#29

Doesnt works, it searchs for wordfence-waf.php.

I’m trying to change path in htaccess:

# Wordfence WAF
<IfModule mod_php7.c>
	php_value auto_prepend_file '/home/dominewp/app/public/wordfence-waf.php'
</IfModule>
<Files ".user.ini">
<IfModule mod_authz_core.c>
	Require all denied
</IfModule>
<IfModule !mod_authz_core.c>
	Order deny,allow
	Deny from all
</IfModule>
</Files>

# END Wordfence WAF

#31

Can you change the above to the following?

php_value auto_prepend_file '/app/public/wordfence-waf.php'

#32

Internal Server Error.

php error log:

[02-Jun-2017 19:33:41 UTC] PHP Warning:  Unknown: failed to open stream: No such file or directory in Unknown on line 0
[02-Jun-2017 19:33:41 UTC] PHP Fatal error:  Unknown: Failed opening required '/home/domiqtvw/public_html/wordfence-waf.php' (include_path='.:') in Unknown on line 0
[02-Jun-2017 19:34:42 UTC] PHP Warning:  Unknown: failed to open stream: No such file or directory in Unknown on line 0
[02-Jun-2017 19:34:42 UTC] PHP Fatal error:  Unknown: Failed opening required '/home/domiqtvw/public_html/wordfence-waf.php' (include_path='.:') in Unknown on line 0
[02-Jun-2017 19:36:39 UTC] PHP Warning:  Unknown: failed to open stream: No such file or directory in Unknown on line 0
[02-Jun-2017 19:36:39 UTC] PHP Fatal error:  Unknown: Failed opening required '/home/domiqtvw/public_html/wordfence-waf.php' (include_path='.:') in Unknown on line 0
[02-Jun-2017 19:36:56 UTC] PHP Warning:  Unknown: failed to open stream: No such file or directory in Unknown on line 0
[02-Jun-2017 19:36:56 UTC] PHP Fatal error:  Unknown: Failed opening required '/home/domiqtvw/public_html/wordfence-waf.php' (include_path='.:') in Unknown on line 0
[02-Jun-2017 19:37:21 UTC] PHP Warning:  Unknown: failed to open stream: No such file or directory in Unknown on line 0
[02-Jun-2017 19:37:21 UTC] PHP Fatal error:  Unknown: Failed opening required '/home/domiqtvw/public_html/wordfence-waf.php' (include_path='.:') in Unknown on line 0
[02-Jun-2017 19:37:22 UTC] PHP Warning:  Unknown: failed to open stream: No such file or directory in Unknown on line 0
[02-Jun-2017 19:37:22 UTC] PHP Fatal error:  Unknown: Failed opening required '/home/domiqtvw/public_html/wordfence-waf.php' (include_path='.:') in Unknown on line 0
[02-Jun-2017 19:37:26 UTC] PHP Warning:  Unknown: failed to open stream: No such file or directory in Unknown on line 0
[02-Jun-2017 19:37:26 UTC] PHP Fatal error:  Unknown: Failed opening required '/home/domiqtvw/public_html/wordfence-waf.php' (include_path='.:') in Unknown on line 0
[02-Jun-2017 19:38:36 UTC] PHP Warning:  Unknown: failed to open stream: No such file or directory in Unknown on line 0
[02-Jun-2017 19:38:36 UTC] PHP Fatal error:  Unknown: Failed opening required '/home/domiqtvw/public_html/wordfence-waf.php' (include_path='.:') in Unknown on line 0
[02-Jun-2017 19:45:29 UTC] PHP Warning:  Unknown: failed to open stream: No such file or directory in Unknown on line 0
[02-Jun-2017 19:45:29 UTC] PHP Fatal error:  Unknown: Failed opening required '/home/domiqtvw/public_html/wordfence-waf.php' (include_path='.:') in Unknown on line 0
[02-Jun-2017 19:45:31 UTC] PHP Warning:  Unknown: failed to open stream: No such file or directory in Unknown on line 0
[02-Jun-2017 19:45:31 UTC] PHP Fatal error:  Unknown: Failed opening required '/home/domiqtvw/public_html/wordfence-waf.php' (include_path='.:') in Unknown on line 0

#33

Oh my gosh! This worked perfectly. I packaged up my live site using Duplicator and then literally dragged the .zip file into the Local window. I had to change the entry in the SQL file for “home,” but that was easy.


#34

@jdolan - do you mind sharing what version of Local you are using? I’m trying to do this with 2.03 and having issues… but, it’s probably me.

Can you also maybe explain how to change the entry in the SQL file for ‘home’… when I look in my .sql file, I see the first instance of ‘home’ has the URL of my live site… I’m guessing that’s wrong. Is this where you change it ‘easily’?

I saw Clay’s instruction to use WP-CLI by right-clicking on the site in Local to open site SSH… but I got an error message that the container is not running… which I guess isn’t surprising since that is the step my import seemed to hang up on.

thanks for your time!


#35

Hi jdolan when you import the .zip from Duplicator you need also to move the installer.php or only the archive.zip?
Thanks for your help


#36

I know that this is a very late answer, but I had the same problem as fouadhousni and suzy: the site seemed to start, but it redirected to the live site automatically. This is how I solved it.

I am using a Mac as a development machine. I have Sequel Pro (aka Pancakes) on my Mac.

  1. From the Local by Flywheel app, I selected “Sequel Pro” under the “Database” tab.
  2. In Sequel Pro I located the “wp_options” table.
  3. I changed two option_values in the wp_options table for option_name “home” and “site_url” to the name that I found in Local by Flywheel for the “Site Domain” under the “Site Setup” tab. In my case it was xxxxxxx-082217.dev

#37

Thanks this for sharing this info it really helped me after spending many hours trying to figure it.
I wish the Flywheel Team would create some clearer step by step videos on how to use Local.

Thanks Ddyer


#38

Hi - I have imported a site using a zip from backupwordpress and it has populated a site within Flywheel with all the right directories, however when I click on the admin or view site button all I get is a blank screen.

Can anyone offer any clues as to what I might have missed please?


#39

All sorted - I tried again with duplicator and it went in fine, phew


#40

@clay When might gzipped tarballs become supported as allowed import file types? This would go for both the whole package as well as the database file inside of it. I almost never use zip or unzip and have always opted for tar both server-side and locally. Smaller files, obv.

Thanks!


#41

I am also having trouble importing my site. I created a backup zip of the site as instructed above. I did the import and accepted all the defaults for creating the server. It started OK, but when I try to access it, I get an “Error establishing database connection” in the browser. When I try to access the admin panel, it says “One or more database tables are unavailable. The database may need to be repaired.” No log entries are being written, in the Locals log, the app/logs directories or in wp-content. I also added the following to wp-config.php:

define( ‘WP_DEBUG’, true );
define( ‘WP_DEBUG_LOG’, true );
define( ‘WP_DEBUG_DISPLAY’, false );
@ini_set( ‘display_errors’, 0 );
define( ‘SCRIPT_DEBUG’, true );

but still no log entries are being written, so I can’t figure out what’s going on.

I can Adminer the database, so it’s running, and the tables in it look fine.

Any ideas?

Thanks


#42

If the DB was set up correctly on the server (seems like it was) then it maybe a setting that is not correct in your wp-config file. For example, the server may not be localhost.

I’d contact your host to see what they can do for you.

Bud