• Resolved piblo

    (@piblo)


    Hello,

    My current WP configuration

    WordPress Version: 4.9.8
    Theme used: Twenty Eleven
    PHP / MySQL Version: 5.6

    I want to make a copy from a remote WordPress site to a USB key. I have almost succeeded but I still have some problems. Let’s imagine that my addess’ site is https://www.mysite.fr/

    I installed UwAmp on the key: PHP 5.6.18, MySQL 5.7.11
    Apache, PHPMyAdmin, etc … work perfectly.

    Using FileZilla, I imported all the files from www/mysite on the PHPNet server and I put them under I:\UwAmp\www\ monsite on my key.

    Using PHPMyAdmin, I exported the database and imported it to the key. Its name is unchanged.

    By means of DBSR-master, installed under I:\UwAmp\www\mysite, I replaced in the database all occurrences of https://www.mysite.fr by http: //localhost.monsite. More than 1500 occurrences were found.

    In wp-config.php, I corrected the following lines:

    define (‘DB_USER’, ‘root’);
    define (‘DB_PASSWORD’, ‘root’);
    define (‘DB_HOST’, ‘localhost’);

    When I enter the URL localhost/mysite/in my browser, the homepage of my site is correctly displayed (with its theme, etc …). External links also work, of course. However, when I enter another internal URL than this of the homepage (or click on an internal link to the site), the UwAmp page is displayed: the one corresponding to I:\UwAmp\www\index.php. The URL remains in the navigation bar.

    Do you have any idea what’s going on? Thanks in advance.

    Regards,
    Piblo

    • This topic was modified 6 years, 6 months ago by piblo. Reason: small mistake corrected
Viewing 5 replies - 1 through 5 (of 5 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Knowing nothing about the software stack you’re using, I suspect that apache is ignoring your .htaccess file.

    So, first, go to SETTINGS->Permalinks and resave the permalinks.

    If that doesn’t fix things, find the apache configuration, and look for a line like

    AllowOverride None.

    Change that to

    AllowOverride All

    and restart Apache.

    What Steve said… because the .htaccess file is relative, so by using a URL that starts with a slash, it goes to the wrong place. You have to make it appear as if the folder is the root.

    Also, you might encounter problems if your domain name was a different length than the localhost/monsite length, because it could be in the options table serialized, so a global find/replace would change the text but not the length. It’s best to use a plugin for this in future.

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Also, in most of the default configurations of Apache* the default is “None”, which ignores .htaccess.

    *Depends on the distro

    Thread Starter piblo

    (@piblo)

    Hi Steven and Joy,

    Joy said : ” because the .htaccess file is relative, so by using a URL that starts with a slash, it goes to the wrong place “. The URLs that do not work are on the form of ‘localhost/mysite/pagename/’

    I forgot to say that my computer is under Windows 7. Perhaps this could help in your replies/advices.

    FYI, the content of my .htaccess – which is located in the root of directory I:\UwAmp\www\mysite – is :

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

    # END WordPress

    • This reply was modified 6 years, 6 months ago by piblo.
    Thread Starter piblo

    (@piblo)

    Hi Steven and Joy,

    Tonight, I realized that I didn’t apply Steven’s advices. I indeed thought that I could’t display the ‘wp-admin’ page. I was wrong. I got it, logged in as WP administrator, went to settings>Permalinks and resaved these latter. I couldn’t believe. It works !!

    Warm thanks.

    Best regards,
    Piblo

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Migration of a remote WordPress site to a USB key’ is closed to new replies.