.htaccess file is blank after importing a site

What issue or error are you experiencing?

I just update mi OS to pop os (in case that is important) I’ve been running sites and all good so far, I export a new site from a live server (something I do on daily basis) using wp-migrate. The site starts, but I can’t go from the home page, I thought that it was a redirect issue and after see the .htaccess I see that it is blank.


What steps can be taken to replicate the issue? Feel free to include screenshots, videos, etc

export everything with migrate-wp
import to a new site
open site
go to any url beyond root


System Details

  • Local Version:
    Version 7.2.1+6433
  • Operating System (OS) and OS version:
    No LSB modules are available.
    Distributor ID: Pop
    Description: Pop!_OS 22.04 LTS
    Release: 22.04
    Codename: jammy
    roberto@pop-os:~$

Local Logs

Attach your Local Logs here (Help Doc - Retrieving Local’s Log)

{"thread":"worker","worker":"analyzeImportWorker","level":"info","message":"checkLocalExport","timestamp":"2023-09-22T23:53:59.283Z"}
{"thread":"worker","worker":"analyzeImportWorker","level":"info","message":"Analyzing Zip: Listing Contents for Local Export Check","timestamp":"2023-09-22T23:53:59.285Z"}
{"thread":"worker","worker":"analyzeImportWorker","level":"info","message":"checkWpMigrate","timestamp":"2023-09-22T23:53:59.286Z"}
{"thread":"worker","worker":"analyzeImportWorker","level":"info","message":"Analyzing Zip: Listing Contents for WP Migrate Export Check","timestamp":"2023-09-22T23:53:59.287Z"}
{"thread":"worker","worker":"analyzeImportWorker","level":"debug","message":"Analysis of zip: WP Migrate Export","timestamp":"2023-09-22T23:53:59.287Z"}
{"thread":"worker","worker":"analyzeImportWorker","level":"info","message":"checkBackupBuddy","timestamp":"2023-09-22T23:53:59.288Z"}
{"thread":"worker","worker":"analyzeImportWorker","level":"info","message":"checkGenericArchive","timestamp":"2023-09-22T23:53:59.288Z"}
{"thread":"worker","worker":"analyzeImportWorker","level":"info","message":"Analyzing Archive: Listing Contents for Generic Archive Check","timestamp":"2023-09-22T23:53:59.289Z"}


{"localVersion":"7.2.1+6433","osPlatform":"linux","osRelease":"6.4.6-76060406-generic","osArch":"x64","windowsEdition":null,"linuxEdition":{"os":"linux","dist":"Ubuntu"},"level":"warn","message":"Electron Event ready","timestamp":"2023-09-22T23:59:06.924Z"}
{"thread":"main","class":"Process","process":"mysql","level":"warn","message":"2023-09-22T23:59:27.677524Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).","timestamp":"2023-09-22T23:59:27.683Z"}
{"thread":"main","class":"Process","process":"mysql","level":"warn","message":"2023-09-22T23:59:27.677645Z 0 [Note] --secure-file-priv is set to NULL. Operations related to importing and exporting data are disabled","timestamp":"2023-09-22T23:59:27.692Z"}
{"thread":"main","class":"Process","process":"mysql","level":"warn","message":"2023-09-22T23:59:27.677667Z 0 [Note] %%userDataPath%%/lightning-services/mysql-5.7.28+4/bin/linux/bin/mysqld (mysqld 5.7.28) starting as process 20784 ...","timestamp":"2023-09-22T23:59:27.693Z"}
{"thread":"main","class":"Process","process":"mysql","level":"warn","message":"2023-09-22T23:59:27.677707Z 0 [ERROR] Can't find error-message file '/usr/local/mysql/share/errmsg.sys'. Check error-message file location and 'lc-messages-dir' configuration directive.","timestamp":"2023-09-22T23:59:27.694Z"}
{"thread":"main","class":"Process","process":"mysql","level":"warn","message":"2023-09-22T23:59:27.681451Z 0 [Note] InnoDB: PUNCH HOLE support available","timestamp":"2023-09-22T23:59:27.695Z"}
{"thread":"main","class":"Process","process":"mysql","level":"warn","message":"2023-09-22T23:59:27.681487Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins","timestamp":"2023-09-22T23:59:27.696Z"}
{"thread":"main","class":"Process","process":"mysql","level":"warn","message":"2023-09-22T23:59:27.681495Z 0 [Note] InnoDB: Uses event mutexes","timestamp":"2023-09-22T23:59:27.697Z"}
{"thread":"main","class":"Process","process":"mysql","level":"warn","message":"2023-09-22T23:59:27.681502Z 0 [Note] InnoDB: GCC builtin __sync_synchronize() is used for memory barrier","timestamp":"2023-09-22T23:59:27.697Z"}
{"thread":"main","class":"Process","process":"mysql","level":"warn","message":"2023-09-22T23:59:27.681507Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.11","timestamp":"2023-09-22T23:59:27.698Z"}
{"thread":"main","class":"Process","process":"mysql","level":"warn","message":"2023-09-22T23:59:27.681517Z 0 [Note] InnoDB: Using Linux native AIO","timestamp":"2023-09-22T23:59:27.699Z"}
{"thread":"main","class":"Process","process":"mysql","level":"warn","message":"2023-09-22T23:59:27.681932Z 0 [Note] InnoDB: Number of pools: 1","timestamp":"2023-09-22T23:59:27.699Z"}
{"thread":"main","class":"Process","process":"mysql","level":"warn","message":"2023-09-22T23:59:27.682090Z 0 [Note] InnoDB: Using CPU crc32 instructions","timestamp":"2023-09-22T23:59:27.700Z"}
{"thread":"main","class":"Process","process":"mysql","level":"warn","message":"2023-09-22T23:59:27.684786Z 0 [Note] InnoDB: Initializing buffer pool, total size = 32M, instances = 1, chunk size = 32M","timestamp":"2023-09-22T23:59:27.704Z"}
{"thread":"main","class":"Process","process":"mysql","level":"warn","message":"2023-09-22T23:59:27.689490Z 0 [Note] InnoDB: Completed initialization of buffer pool","timestamp":"2023-09-22T23:59:27.705Z"}
{"thread":"main","class":"Process","process":"mysql","level":"warn","message":"2023-09-22T23:59:27.695102Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().","timestamp":"2023-09-22T23:59:27.705Z"}
{"thread":"main","class":"Process","process":"mysql","level":"warn","message":"2023-09-22T23:59:27.704655Z 0 [Note] InnoDB: Highest supported file format is Barracuda.","timestamp":"2023-09-22T23:59:27.707Z"}
{"thread":"main","class":"Process","process":"mysql","level":"warn","message":"2023-09-22T23:59:27.717904Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables","timestamp":"2023-09-22T23:59:27.719Z"}
{"thread":"main","class":"Process","process":"mysql","level":"warn","message":"2023-09-22T23:59:27.718007Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...","timestamp":"2023-09-22T23:59:27.719Z"}
{"thread":"main","class":"Process","process":"mysql","level":"warn","message":"2023-09-22T23:59:27.766202Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.","timestamp":"2023-09-22T23:59:27.772Z"}
{"thread":"main","class":"Process","process":"mysql","level":"warn","message":"2023-09-22T23:59:27.767344Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.","timestamp":"2023-09-22T23:59:27.774Z"}
{"thread":"main","class":"Process","process":"mysql","level":"warn","message":"2023-09-22T23:59:27.767366Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.","timestamp":"2023-09-22T23:59:27.775Z"}
{"thread":"main","class":"Process","process":"mysql","level":"warn","message":"2023-09-22T23:59:27.767914Z 0 [Note] InnoDB: Waiting for purge to start","timestamp":"2023-09-22T23:59:27.775Z"}
{"thread":"main","class":"Process","process":"mysql","level":"warn","message":"2023-09-22T23:59:27.818084Z 0 [Note] InnoDB: 5.7.28 started; log sequence number 58092562","timestamp":"2023-09-22T23:59:27.818Z"}
{"thread":"main","class":"Process","process":"mysql","level":"warn","message":"2023-09-22T23:59:27.818312Z 0 [Note] InnoDB: Loading buffer pool(s) from %%site.runData%%/mysql/data/ib_buffer_pool","timestamp":"2023-09-22T23:59:27.822Z"}
{"thread":"main","class":"Process","process":"mysql","level":"warn","message":"2023-09-22T23:59:27.818457Z 0 [Note] Plugin 'FEDERATED' is disabled.","timestamp":"2023-09-22T23:59:27.825Z"}
{"thread":"main","class":"Process","process":"mysql","level":"warn","message":"2023-09-22T23:59:27.821771Z 0 [Note] Found ca.pem, server-cert.pem and server-key.pem in data directory. Trying to enable SSL support using them.","timestamp":"2023-09-22T23:59:27.827Z"}
{"thread":"main","class":"Process","process":"mysql","level":"warn","message":"2023-09-22T23:59:27.821800Z 0 [Note] Skipping generation of SSL certificates as certificate files are present in data directory.","timestamp":"2023-09-22T23:59:27.828Z"}
{"thread":"main","class":"Process","process":"mysql","level":"warn","message":"2023-09-22T23:59:27.822944Z 0 [Warning] CA certificate ca.pem is self signed.","timestamp":"2023-09-22T23:59:27.829Z"}
{"thread":"main","class":"Process","process":"mysql","level":"warn","message":"2023-09-22T23:59:27.824120Z 0 [Note] Skipping generation of RSA key pair as key files are present in data directory.","timestamp":"2023-09-22T23:59:27.829Z"}
{"thread":"main","class":"Process","process":"mysql","level":"warn","message":"2023-09-22T23:59:27.825329Z 0 [Note] Server hostname (bind-address): '127.0.0.1'; port: 10003","timestamp":"2023-09-22T23:59:27.830Z"}
{"thread":"main","class":"Process","process":"mysql","level":"warn","message":"2023-09-22T23:59:27.825378Z 0 [Note]   - '127.0.0.1' resolves to '127.0.0.1';","timestamp":"2023-09-22T23:59:27.831Z"}
{"thread":"main","class":"Process","process":"mysql","level":"warn","message":"2023-09-22T23:59:27.825402Z 0 [Note] Server socket created on IP: '127.0.0.1'.","timestamp":"2023-09-22T23:59:27.832Z"}
{"thread":"main","class":"Process","process":"mysql","level":"warn","message":"2023-09-22T23:59:27.828785Z 0 [Note] InnoDB: Buffer pool(s) load completed at 230922 19:59:27","timestamp":"2023-09-22T23:59:27.834Z"}
{"thread":"main","class":"Process","process":"mysql","level":"warn","message":"2023-09-22T23:59:27.840274Z 0 [Note] Event Scheduler: Loaded 0 events","timestamp":"2023-09-22T23:59:27.840Z"}
{"thread":"main","class":"Process","process":"mysql","level":"warn","message":"2023-09-22T23:59:27.840490Z 0 [Note] ","timestamp":"2023-09-22T23:59:27.842Z"}

Security Reminder
Local does a pretty good job of scrubbing private info from the logs and the errors it produces, however there’s always the possibility that something private can come through. Because these are public forums, always review the screenshots you are sharing to make sure there isn’t private info like passwords being displayed.

Hi @soyrbto

Since you mentioned htaccess, did you create a site using Apache server type? Is that what your hosted site is using?

Does your hard drive have enough space?

If you create a new, blank site in Local does that work okay?

Hey nick!

  1. Yes the live site server and local have the same config apache

  2. Yes, I have enough space in my hard drive

  3. I created afterward a site with the same config (apache and php version) and it worked

As an additional note I copy paste the .htaccess from a newly created site in local and it worked. I tested importing other sites and the same result. Importing everything but with htaccess blank and I manually have to added for local expected structure

1 Like

Sounds great! So are things working as expected now or do you still have any issues?

Yes and no, this was a workaraound, just to be clear

  1. I created a blank site with same config
  2. I went into the public folder and copy the .htaccess of this newly created site
  3. Move to my imported problem site and paste the .htaccess of the newly created site

This should not be the expected user behavior with any imported site, something is not working that it is not generating the htaccess with import sites

Since you can spin up a site with the same configuration fine in Local that seems to indicate something specific with this site might be confusing the import process. I’m glad the manual workaround at least got you fixed up for now.

When you used WP Migrate did you just create a full site export from the hosted site and try to drop that zip into Local?

Yes, but the wierd part is that before updating my os and local wp it worked just fine, so I think the problem is somewhere around the import function

I did a full export with all options from migrate. Is there any setting or action from me expected beside just dropping the zip?

Sometimes there can be extra files that confuse the import process. If you adjust your zip down to just the WP Content and SQL files and exclude all else, does that import okay or give you similar issues?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.