Duplicate Elgg 2.3 on new server

I duplicated my Elgg 2.3 site on a new VPS with the same URL. HopefullyI followed all the instructions here .
The only difference between the two installations is the data file address.
 
Initial tests show that the new installation is working fine, except for the ICONS.
 
The images URLs of the original installation look like this:
 
The images URLs of the new installation are like this:
 
What is the reason and how to fix?
 
Thank you very much.
  • I gave instructions on when to update Elgg:

    From Elgg Docs:

    * A backup of the live Elgg database.
    * A place to copy the live database.
    * A server suitable for installing duplicate Elgg site.  
    
    During this tutorial, we will make these assumptions about the production Elgg site: 
    * The URL is http://www.myelgg.org/
    * The installation path is /var/www/elgg/
    * The data directory is /var/data/elgg/
    * The database host is 'localhost'
    * The database name is 'production_elgg'
    * The database user is 'db_user'
    * The database password is 'db_password'
    * The database prefix is 'elgg'
    
    At the end of the tutorial, our test Elgg installation details will be: 
    * The URL is http://test.myelgg.org/
    * The installation path is /var/www/elgg_test/
    * The data directory is /var/data/elgg_test/
    * The database host is 'localhost'
    * The database name is 'test_elgg'
    * The database user is 'db_user'
    * The database password is 'db_password'
    * The database prefix is 'elgg'
    
    Copy Elgg Code to the Test Server
    cp -a /var/www/elgg/ /var/www/elgg_test/
    
    Copy Data to the Test Server
    cp -a /var/data/elgg/ /var/data/elgg_test/
    
    Edit engine/settings.php
    
    Copy Elgg Database
    
    Change the installation path 
     UPDATE `elgg_datalists` SET `value` = "/var/www/elgg_test/" WHERE `name` = "path"; 
     
     Change the data directory 
     UPDATE `elgg_datalists` SET `value` = "/var/data/elgg_test/" WHERE `name` = "dataroot"; 
     
     Change the site URL 
     UPDATE `elgg_sites_entity` SET `url` = "http://test.myelgg.org/"; 
     
     Change the filestore data directory 
    (Only change the first path here!!) 
     UPDATE elgg_metastrings set string = '/var/data/elgg_test/' WHERE id = (SELECT value_id from elgg_metadata where name_id = (SELECT * FROM (SELECT id FROM elgg_metastrings WHERE string = 'filestore::dir_root') as ms2) LIMIT 1) ; 
     
     Check .htaccess
    ==============================

    How to synchronize:

    rsync -avz -8 -e rsync://root@your-ip-address:port/var/www/elgg/ /var/www/elgg/
    
    or 
    
    rsync -avz -8 -e "ssh -p 22" root@your-ip-address:/var/www/elgg/ /var/www/elgg/


    Edit engine/settings.php
     
    Backup DB on old server
     
     Copy to new server

    rsync -avz -8 -e ssh root@your-ip:/var/www/elgg/ /var/www/

    Insert to DB

    mysql -u user -ppasswords dbname < db_dump.sql
    
    rsync -avz -8 -e rsync://root@ip-address:port/var/www/elgg/ /var/www/elgg/


     
     Edit engine/settings.php
     
    Backup DB on old server
     
     Copy to new server

     rsync -avz -8 -e ssh root@ip-address:/var/www/elgg/ /var/www/
     

    Insert to DB

    mysql -u root -pPASSWORD DBNAME < dbname_dump.sql
  • Are you comparing the same kind of images on the same version of Elgg?

    There are filetype icons used for non-image files and image previews (thumbnails) for image files. For the first type of files the same image icon is used for every file of the same type whereas the image file thumbnails are different for every single file. The image icon files used are located somewhere within the Elgg install directory (and cached in the data directory cache folder). The thumbnail files are saved in the data directory and served from there.

    Additionally, the functionality behind the serving of files/ image files has changed in Elgg 2.3 compared to older versions of Elgg (2.2 or earlier). I think on Elgg 2.2 you got the "cache" urls for every type of file whereas Elgg 2.3 uses the "serve-file" urls for uploaded files/thumbnails. The difference with the "serve-file" urls is that they are semi-permanent (for the current session) or permanent (can be used to link to a specific file). I'm not sure at the moment how to identify the permanent urls (maybe the urls with "serve-file" ARE the permanent urls actually. In any case, the urls with "cache" are not permanent, i.e. if you flush the cache, the corresponding icon files are cached again when they are used within a page but the cache url will be different.

  • Thank you iionly.

    It is not clear to me why two identical installation have different behavior. The old sit is on a shared host the new one on a VPS. 

    Since I'm quite new to the VPS I suspect that I did not configure it correctly, or some module is missing. Could you please mention some of the main important points regarding Elgg 2.3 on VPS ?

    Thank you very much

  • The difference in URL is definitely not a matter related to the configuration of your VPS server.

    It might be that the cache settings of Elgg ("Advanced Settings" in the admin area of your site) differ between the old site and new site and this might cause different URLs (e.g. with caching disabled or some caching options at least) the caching of the files might not be possible in the first place, so you won't get a "cache" URL.

    Apart from the caching options available on the Advanded Settings you might also want to create the symbolic link in the root folder of your Elgg installation. At least for me it never worked to let Elgg create it automatically. Nonetheless, the Advanced Settings page will tell you where the "cache" link would have to point to exactly within the data directory.

  • Thank you iionly.

    I'm going to check this.

  • Thank you very much Nikolai and iionly. I learn a lot from your answers.

    However, I reinstalled the site from scratch and the initial tests show that it works well. The problem with the images disappeared. 

    All the best.