• Hello,

    First of all my apologizes if this is already solved but I couldn’t find a post with the solution. I’m a complete newbie in WP (about just 2 weeks fighting with it).

    I installed WP in Windows 7 using XAMPP as environment for apache, php and mysql. I did the same installation in two different computers (home and work). After that, I installed a theme that I bought and I design my web. To copy my site and have the updated version in both computers I did it just copying the xampp entire folder and replacing it in the other computer.

    My problem is the following: I want to migrate this site to a Linux server that I’ve settled with Debian 7.7. I tried two options:

    1) Installing wordpress using apt:
    1.a) Using wheezy version (3.6)
    1.b) Changing sources.list to used sid and installing wordpress 4

    2) Installing the LAMP components one by one (apache, mysql and php) with apt and then installing wordpress from the latest .tar.gz file.

    In both cases I’m able to install wordpress correctly but my problem is the following: when I try to export the data from my site installed in the Windows machine to my Linux server it seems that always something is not working. Basically: it doesn’t copy the wordpress configuration that I had in Windows (all the configration about the theme, the configuration about WP itself (permalinks, hosts, etc..)). After copying my windows site to linux the configuration appears as default and not as I set it in Windows. That makes that when I import the site itself (copying everything from folder to folder or using plugins such as backup-wp) my page is not displayed correctly: images are not loaded (even after copy them manually into “uploads” subfolder of “wp-content” folder), links are not correct, etc.

    Definitely, it seems that it is a configuration problem. Can someone help me about how to do the migration process?

    Thanks

Viewing 11 replies - 1 through 11 (of 11 total)
  • There are several plugins that help with migrating a site.

    The issue is that all of the links stored in the database are pointing to your local xampp install and not the new servers path. If you open the database file in a text editor you can do a search and replace to change the domain name to the new one on your linux install. So to say another way you should do a fresh install of WordPress on the linux box, install your theme, and then import your xampp database after editing it to replace the domain name.

    To make thing worse some options are stored as serialized data and need more work than simply doing a search and replace. That’s what is breaking the theme options. One way to deal with it is to change the Site url in the settings>general section on the xampp install to the new linux url and then save it and export the database. This will BREAK your local intstall though.

    Best way is to use an app such as https://interconnectit.com/products/search-and-replace-for-wordpress-databases/ if your doing it manually (without a plugin).

    Hope this helps a bit … we’ve all been through it … welcome to WordPress!

    Thread Starter alejandrorodgnz

    (@alejandrorodgnz)

    Hi!

    Thank you very much for your reply!

    I follow your advice and I made a clean install, I change in my original server the host to point to the destiny one, I export the database (anyway I made a search/replace in the SQL file of the exported database) and I import the SQL file in the new database.

    It seems that most of the things work ok except a few configurations of the theme that I did manually quicky.

    However, I lost all the links to my pages. Now, only the main page is working. If I try to enter in any of the subpages that are in the menu the links are broken (404). It is weird because if I go to the pages editor in wordpress, everything is there and the link seems to be correct. Even I can edit the content (but, this is interesting, visual composer plugin now is not working with any page) I suppose that there is a problem with the paths in the database (?) or with the paths in the server (?) but I couldn’t figure out what is the problem!

    I also tried to create a new test page but the link is broken again ??

    If anyone wants to take a look the page is published at https://www.alejandrorg.com

    Thanks!

    Try resetting the Permalinks. Settings>Permalinks. Change them to another option, save and then change them back.

    Thread Starter alejandrorodgnz

    (@alejandrorodgnz)

    Nothing, I check that .htaccess is being written correctly but the problem still persists! Thanks for your answer anyway!!

    Any other suggestion will be also welcome ??

    All the links have a trailing slash which I think is wrong.

    https://www.alejandrorg.com/phd/

    If you create a new page what is the permalink? Can you preview a newly created page. If you click view page from the editor after publishing it does it work?

    Please post your htaccess file. Also try changing the permalinks to the default.

    Thread Starter alejandrorodgnz

    (@alejandrorodgnz)

    Hi Radices,

    Step by step:

    With current permalink (post name) if I create a new page and I preview it before publish it, it works (link: https://www.alejandrorg.com/?page_id=274&preview=true).

    After publishing it, not: https://www.alejandrorg.com/t1/ (neither with final slash or not)

    Current .htaccess:

    # 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
    I change now permalink to default and I tried to create a second test:

    Before publish, preview works: https://www.alejandrorg.com/?page_id=276&preview=true

    After publish, it works with the default permalink: https://www.alejandrorg.com/?page_id=276

    .htaccess with default permalink: Empty

    And, with default permalink seems that now works. However it would be interesting know why post-name permalinks now are broken ??

    Thanks for your valuable help!!

    Well that’s good that you’re making progress. At least the site works while you work for a final answer.

    Can you look at the Slug for the page. In the editor window pull down screen options at the top and check the box next to Slug if it isn’t already. Scroll down and look at the Slug field. Does it look ok? IS it the same as the permalink ending?

    Thread Starter alejandrorodgnz

    (@alejandrorodgnz)

    Hi!

    In my version of wordpress the slug appears just under the title of the page.

    With default option the slug is the typical “?page_id=”

    With the post-name it appears as the “post name” (for ex: https://www.alejandrorg.com/3d-die-creator/) but the problem persists because with this URL the page didn’t charge

    Not that it has anything to do with it but you should update WordPress to the latest version for security reasons.

    Thread Starter alejandrorodgnz

    (@alejandrorodgnz)

    Hi!

    Finally I solved the problem. It was a problem with my vhost configuration. The solution is explained here:

    https://stackoverflow.com/questions/869092/how-to-enable-mod-rewrite-for-apache-2-2

    Basically I’ve to change the AllowOverride parameter to “All” and.. it works.

    Thanks for everything.

    Cheers

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Migration of a WP website in XAMPP with Windows to WP with LAMP in Debian’ is closed to new replies.