Support » Plugin: Duplicator - WordPress Migration & Backup Plugin » Local installation of Dupl. and back to live site with two (!) .htaccess

  • Resolved Martin999

    (@martin999)


    Hi,
    I just have installed a Duplicator clone of my live site locally successfully (Mamp for windows). Locally I have converted my theme to its successor, because the webserver doesn’t allow the conversion plugin to fill its newly created tables for the new theme. Obviously any security issue, but hoster support doesn’t find the reason (SQL injection?).

    Before creating a new Duplicator clone and installing it back to the live site I checked some things and I discovered two (!) .htaccess files in my local site folder. A shortened “.htaccess” and the renamed original one (with 301-redirection, deflate-compression, admin password protection and browser caching), “htaccess…..-orig”.

    Question 1:
    What will happen with these two .htaccess files after installing the local clone on the webserver? Will I have ONE .htaccess with complete content again, like before?

    What about robots.txt, htpasswd-file and other files in WP root?

    Question 2:
    If the webserver doesn’t allow a conversion plugin to fill new tables, is it possible server also blocks Duplicator to fill tables (I guess Duplicator fills tables, like the conversion plugin)?

    It is said that hoster sometimes do not support Duplicator. Is this “table-fill-blocking” one of the hoster issues you know, due to your experience? Hoster is Domainfactory (Germany).

    Thanks,

    Martinus999

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hey @martin999,

    1. During each install process, the installer will create a backup of your original and rename it to .htaccess to something like .htaccess.[hash].orig the new .htaccess is stripped down to work with the new site so there are no major issues. For advanced users on step 1 under options, you can click the checkbox to skip updating the .htaccess file, but this means you will need to manually configure it to fit the new site environment. If you had a .htaccess–.orig file in site that wasn’t being used and you clone your site again then you would have that one copied, unless you manually filtered it out or removed it through FTP or your cpanel. The plugin will copy all files that are not excluded including robots.txt ect.

    2. I’m not 100% sure on this one or if I understand the question. We haven’t ran into a host yet that does not PHP to run CREATE TABLE and INSERT STATMENTS. If that was the case then users couldn’t install very many plugins, but I’m not sure if that is what the host is saying for sure or not.

    Hope that helps~

    Thread Starter Martin999

    (@martin999)

    Hi Cory,
    thanks for your response.

    1a) .htaccess
    After installing the clone of my live site locally there was only one thing I had to do: the conversion of the old theme to its successor (basically the same theme, different name ect.). This shouldn’t affect my htacces, which has an admin password, a 301-redirect rewrite rule, deflate compression, browser caching and of course the WP standard code.

    Let’s say I make now a new duplicator clone locally and install it on back on my live site, without any special actions like excluding it via Dupl.-options. Then I will have finally exactly the same two .htaccess-files in my folder there, like I have now locally?

    If yes, then I will have to rename the “orig-copy” to “.htaccess” and delete the shortened one. Because otherwise my shortened “.htaccess” will miss several codes.

    Independant from this all, I should do the “resave permalink” in step 4, right?

    1b) Before starting the installer.php on my live site the website folder there should be really empty, except Duplicator-installer/archive?

    Deleting manually per FTP all WP-Files (htaccess, htpasswd, wp-config, wp-content ect.) makes me a bit trembling… 🙂 and even in one of your recommended videos Denver COder Timothy Meyers does in NOT: https://www.youtube.com/watch?v=gv5d0xKko_U

    2. The webserver allows CREATING new theme-tables by the conversion plugin, but they were NOT FILLED with entries. This is a fact, which shows my phpMyAdmin. Doing it locally both created and filled new tables, no problem here.

    The reason is unclear, but theme developer supposes any security measurement of the server, which blocks the inserting of rows. And whatever may cause the blocked insert… I asked myself if it could block Duplicator doing its normal job….

    Yes your .htaccess files will be copied, you may have to reconfigure the .htaccess if you made custom edits to it. If you used a plugin that made edits to the file then you can usually just resave the plugin settings and it will update those settings again. The plugin can only make so many educated guesses and trying to determine the millions of combinations that an .htaccess file will yield really is not possible, at least for a small plugin with a few devs… This is why it starts with a clean file which works for about 99% of most installs.

    You shouldn’t have to resave the permalinks anymore, that was with older versions of the plugin. Those changes are auto-applied when you log in.

    Hope that answers all your questions!

    Thread Starter Martin999

    (@martin999)

    Hey Cory,
    you’re fast as lightning with answering.

    I guess almost everyone has a .htaccess with at least one or two custom edits and it’s important to know, that you have to reconfigure it afterwards.

    So, in my case, I can use the shortened “.htaccess” and add my custom codes (301-redirect, deflate ect.) again. OR I activate the original copied one by renaming it from “.htaccess….orig” to “.htaccess”. I have no plugins which edit the .htaccess.

    “Hope that answers all your questions!”
    Thanks for your efforts. There is only one question left: Is it really necessary to delete all content of the website folder before starting the installer.php? All WP-folders/files and other files like htpasswd, wp-config, robots.txt ect.?

    May be it’s just because I’m not a webdesigner, developer or in any other way trained to do these things and because I’m a bit anxious. But as I told you in my last post, even in your recommended videos already existing WP folder/files are not (always?) deleted before starting installer.php.

    If yes, you may have some calming words for me :).

    Btw, the best thing with Duplicator in my eyes are all the scans and hints which give a high degree of security. Sure, a plugin cannot cover all possible configurations and maybe mistakes of webmasters. Even more your extremely positive reviews are impressive.

    Starting in version 1.3 you don’t have to remove the content before an install, however, it is recommended because when the archive is extracted it can overwrite content if it pre-existed. Mixing files from older setups with the one in the archive could cause issues, that is why it is a best practice to backup or remove the content so you have a clean install.

    Cheers~

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Local installation of Dupl. and back to live site with two (!) .htaccess’ is closed to new replies.