ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

EE and Xampplite

June 02, 2009 4:13am

Subscribe [1]
  • #1 / Jun 02, 2009 4:13am

    jose riveros

    14 posts

    I just went through the process of moving my expression engine local install from my mac to my pc in order to test it in a windows environment.  Just want to the share process so it can go easier for others:

    Part I

    1. Export your EE database to a text file using phpMyAdmin.  I installed MAMP in my applications folder on my mac, so my url looks like:

    <a href="http://localhost/MAMP/">http://localhost/MAMP/</a>

    Click on phpMyAdmin on the top of the MAMP page, then select your EE database.  From the menu tabs select “Export”.  Make sure all of the SQL database tables are in the box, select all, and then save as file using compression if you want.  Save the file to your desktop.  It will appear as:

    name_of_your_database.sql.

    2. Duplicate your EE folder containing all your files and folders for your site.  On my mac, I installed my folder in the my Sites folder as:

    /Users/username/Sites/expressionengine.dev

    Save the folder to your desktop.  Rename it if need be to remove the word “copy” from the folder name.  Move the database sql file into your EE directory.

    3. Transfer that folder to your PC.  Have it sitting on your desktop.

    4. Download XAMPP or XAMPPLITE per instructions on Apache Friends site.  Install using the installer or without the installer.  I personally did not use the installer method and just extracted the contents of the zipped folder to my applications folder:

    C:\Program Files (x86)\xampplite

    *Note that I am using XP64bit, therefore I have two application folders, one for 32bit applications and the other for 64bit.  If you are on a 32bit system it would be:

    C:\Program Files\xampplite

    If you installed using the zipped folder method you would need to locate the application file in the xampplite folder and manually turn on XAMPP:

    Find the setup_xammp.bat file and double-click to run.  Then find the xampp-control.exe, double-click to run, and turn on Apache and MySql using the XAMPP control panel. Note that I right-click on the executable for the control panel and “Pin to Start Menu.”

    Go to the URI:

    <a href="http://localhost">http://localhost</a>

    and click on english for language if applicable.  From there go to Security and properly secure your installation by assigning passwords to root, etc.  Then go to phpMyAdmin and set yourself up as a new user with full privileges and assign your user account a password.  Next create the EE database as usual.

    5. Make sure you have “Hide extensions for known filetypes” unchecked.  My Computer > Tools > Folder Options.

    6.  Move the EE folder on your desktop to the following directory:

    C:\Program Files\xammplite\htdocs

    My folder path now reads:

    C:\Program Files\xammplite\htdocs\expressionengine.dev

    You will name your folder according to your site name.

    In theory your website now should exist at the following URI:

    <a href="http://localhost/name_of_your_site_folder">http://localhost/name_of_your_site_folder</a>

    But, there is work to do.

    7. Go to the following directory:

    C:\WINDOWS\System32\drivers\etc\hosts

    Open the file using a text editor.  There will be a line with the following:

    127.0.0.1 localhost

    Change that line of text by adding the name of your site folder at the end, so it now reads:

    127.0.0.1 localhost name_of_your_site_folder

    In my case it is:

    127.0.0.1 localhost expressionengine.dev

    8. Next go to the following directory:

    C:\Program Files\xampplite\apache\conf\extra\httpd-vhosts.conf

    Open the file and replace lines 19-42 with:

    NameVirtualHost localhost:80
    
    <VirtualHost localhost>
        DocumentRoot "C:/Program Files/xampplite/htdocs"
        ServerName localhost
    </VirtualHost>
    
    <VirtualHost name_of_your_site_folder>
        DocumentRoot "C:/Program Files/xampplite/htdocs/name_of_your_site_folder"
        ServerName name_of_your_site_folder
    </VirtualHost>

    *Change ‘name_of_your_site_folder’ with the real folder name.

    9. Make sure mod_rewrite is “on.”  This is the default setting for XAMPP installations.  But, do check the httpd file at:

    C:\Program Files\xampplite\apache\conf\httpd.conf

    The mod_rewrite rule should be located at line 118-120.

    10. Restart Apache.

  • #2 / Jun 02, 2009 4:25am

    jose riveros

    14 posts

    Part II

    11. Restore your EE database.  Go to your phpMyAdmin and click on “Import” form the menu tab for your EE database.  Locate the database text file by browsing to your site folder.  Import your database.

    12. Go to the following URI:

    <a href="http://name_of_your_site_folder">http://name_of_your_site_folder</a>

    You will most likely see something like “index template” and that’s it.  What probably happened is somehow your database got trashed during the process.  And because you might have saved your Templates as files like I did.  If you open up your template files in your text editor they will be intact.  If you go to your control panel and go to “Templates” and check the files; they will be empty or have some crytic text like “index template.”

    That’s one problem.  Problem number two is the path settings throughout your site structure.  It is most likely you lost your path to your stylesheets, or other templates, or themes folder, or maybe your header and masthead templates got deleted as well.

    13.  Go to:

    <a href="http://name_of_your_site_folder/name_of_your_control_panel.php">http://name_of_your_site_folder/name_of_your_control_panel.php</a>

    or:

    <a href="http://localhost/name_of_your_site_folder/name_of_your_control_panel.php">http://localhost/name_of_your_site_folder/name_of_your_control_panel.php</a>


    In my case it is:

    <a href="http://expressionengine.dev/admin.php">http://expressionengine.dev/admin.php</a>

    Enter your CP as usual.  With my install I lost all the CSS styles not only to my site but to the control panel.  It looked weird.

    As per the Knowledge Base article on moving EE to another server change all the path and URL settings throughout the control panel sections.

    IMPORTANT NOTE:

    Since we are telling Windows and Apache that our site should reside at

    <a href="http://name_of_your_site_folder">http://name_of_your_site_folder</a>

    therefore “pretending” its a real domain we need to change the URI settings accordingly.  An example:

    Section URL -

    <a href="http://name_of_your_site_folder">http://name_of_your_site_folder</a>

    Comment Page URL -

    <a href="http://name_of_your_site_folder/comments.php">http://name_of_your_site_folder/comments.php</a>

    Path settings are as:

    C:/Program Files/xampplite/htdocs/name_of_your_site_folder/themes/

    By following these steps you can have multiple installs of your site(s) by using the XAMPP htdocs folder.  So, instead of:

    <a href="http://localhost/admin.php">http://localhost/admin.php</a>

    or

    <a href="http://localhost/index.php">http://localhost/index.php</a>

    for only this one install of EE.  You can have:

    <a href="http://my_site_no_one">http://my_site_no_one</a>
    <a href="http://my_site_no_two">http://my_site_no_two</a>

    for multiple intstalls or EE sites or other CMS sites.

    14. Finally, cut and paste the Template contents from your stand-alone files into the Template containers in your EE control panel.  All of them.  Even the ones that didn’t go missing.  The data on all my Templates was corrupted during the move of my installation.

    Quite honestly, don’t know why.  Regardless, I got my site installed on my PC for testing.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases