• Resolved yolene

    (@yolene)


    Hi,
    I’m in the process of setting up a website and i need it to have 2 languages versions.
    I’ve tried out WPML but it’s not satifying, so i figured i’ll make 2 wordpress install, it seems like additionnal hassle but in the end it’s the simplest and safest for me. (And also the only way to make sure it will behave the way i want and i’ll have access to all options in both languages)
    I don’t want to use multisite options of WP3 because it seems too complicated and not really worth it if i have only 2 websites.

    So : the thing is, i’ve already started tweaking the theme, making the category structure , added plugins, etc … so to gain time i’d like to install in the subfolder the exact same website as the one in the main folder. Only the database would need to be different, or maybe stay in the same database but tables with different prefix , whatever is most easy.

    So any advice how to do that ? Does setting parameters in the theme, plugins etc … create new tables and table entries ? Then i’d need to copy the database also, but is there a way to “rename” everything with a new prefix ?

    Any advice will be very welcome 🙂
    Thanks a lot

Viewing 9 replies - 1 through 9 (of 9 total)
  • I can assure you using WordPress multisite isn’t complicated at all, it is almost as easy as installing WordPress. This would be the best solution.

    Thread Starter yolene

    (@yolene)

    Yeah setting it up is not that hard (yet harder then wp.org says), but then i keep reading posts of things which don’t really work out, espacially for the kind of website i want to have. So i don’t care if it takes more work to do everything 2 times, at least it doesn’t takes days spent on forums for problem solving 😉

    Now talking about problem solving …
    So i’ve created a subdirectory “fr” (for the 2nd language), and i’ve copied all the files there, i’ve set up a second database, and in the wpconfig.php file i changed the name of the database.
    So all smooth.
    BUT, now i thought ok let’s log into my 2nd website so i got
    domainname.com/fr/wp-admin … the problem it automatically redirects me to domainname.com/wp-admin, which is the admin for the english website, not the french one …how to solve that ?
    When i check domainname/fr/index.html all seems fine, the 2nd website is there, but well i’d like to be able to administer it 😀
    Thanks a lot for your help

    you need to make sure that the wp-config.php of the /fr site is not containing any references you might have copied from the /en site.

    Thread Starter yolene

    (@yolene)

    thanks, you set me on the right track, although the change to make wasn’t in wp-config.
    I was searching in wp-config and was about to test by changing

    /** Absolute path to the WordPress directory. */
    if ( !defined(‘ABSPATH’) )
    define(‘ABSPATH’, dirname(__FILE__) . ‘/’);

    but then i realized i shall check the database : there was the answer, i had omitted to change the value of siteurl in the wp_options table. I changed it by adding /fr/ and now it works just fine.

    I’ve just explained that in case someone has the same problem.
    So issue closed. Thanks

    Great thanks for letting us know, please mark the topic resolved, have a good day!

    Hi Yolene

    Thanks for a great thread – I have been searching all over the web to figure out how to set up my english version of my site using a sub-folder and copying my entire site into that, so I was happy to find out that that is exactly what you did.

    I am not a coder, but knows a little bit of html – however, I have a favour I hope you will help me with.

    Can you by any chance give me a step by step guide of how you exactly did this? It would be so much appreciated 🙂

    I am hoping for your help and is looking forward to hearing from you.

    Kind regards,
    Helle

    Thread Starter yolene

    (@yolene)

    well i explained in the previous post :

    So i’ve created a subdirectory “fr” (for the 2nd language), and i’ve copied all the files there, i’ve set up a second database, and in the wpconfig.php file i changed the name of the database.

    and then last but not least

    i realized i shall check the database : there was the answer, i had omitted to change the value of siteurl in the wp_options table. I changed it by adding /fr/ and now it works just fine.

    if there’s something you don’t understand or don’t know how to do please say what exactly and i’ll explain in more details

    Hi Yolene 🙂

    I have just gone through the entire procedure, but instead of using 2 databases I only used one because my host doesn’t allow me more than 1 DB. What I did then is I changed the prefixes of all the tables for the 2nd instance of the site. So now all tables exist with wp_tableName and wp_en_tableName. With the exact same content.

    I created a subfolder /en/ at the root of my site, and copied all the files from the root, to that folder, so now all files and folders exist at the root, and within the /en/ folder.

    I changed the value of the siteUrl in wp_en_options to http://www.mydomain.com/en/.

    I also changed the /en/.htaccess file permissions to 644 as it was on the original file at the root, but I have no idea what that changes exactly. Should I even have included it in the copy?

    When I try to browse to http://www.mydomain.com/en/ I get my site with an error message that says:
    Oops this is embarrassing. You have encountered an error. Go to our front page here and find loads of interesting content…

    Do you think using only 1 database could be the problem?

    Thanks!

    Seb 🙂

    Thread Starter yolene

    (@yolene)

    having only one database shouldn’t be a problem, BUT then wp needs to know which tables to use : you need to specify the prefix of the tables of your second wp installation. I don’t know how this property would be called; if you can login at yousite.com/en/wp-login then find it in general options. If you can’t then go and search for it directly in the database (through phpmyadmin through your hosting service).
    good luck

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Install the exact same WP configuration in a sub-folder’ is closed to new replies.