I created a new WP locally, using Webmatrix.
It is meant to replace another WP installation that already existed in my hosting account.
1- After I finished I uploaded the files to the directory that has my live WP, that is "DOMAIN.com/MAIN (because I want WP to have its own directory, not to dwell directly inside public_html).The new files replaced the old ones.
2- I opened config.php and updated the names of the database and the user and password to match them in the DB that is already existing.
3- I imoprted the DB after I edited it with Notepad ++ and changed all "localhost:xxxx" with "DOMAIN.COM".
The import involved dropping all existing tables.
4- Then I found the Home url in the databse and changed it into "DOMAIN.com/main".
5- Now visiting DOMAIN.com OR DOMAIN.com/MAIN shows the website without any theme at all only texts.. visiting DOMAIN.com/MAIN/PAGE1 gives error 404.
Visiting DOMAIN.com/wp-admin OR DOMAIN.com/MAIN/wp-admin gives 404 as well.
What did I miss ?