Well, the answer has several different ways..
==Method 1==
(when you want your website permalinks to become like example.com/wp/smth
)
if so, just change this:
RewriteBase /
to
RewriteBase /wp
and in database, change all occurrences of example.com/
to example.com/wp/
==Method 2==
(when you want your website permalinks to remain example.com/smth
)
Now you have A and B methods (As you say, you have made some changes to DB manually… revert them back and continue reading..). :
A) you should move all things from wp
folder to public_html folder.
B) to use only .htaccess
trick to solve the problem, and you can place all files into root>wp
folder :
<IfModule mod_rewrite.c>
# move primary domain to subfolder
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www.)?example.com$
RewriteCond %{REQUEST_URI} !^/wp/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /wp/$1
RewriteCond %{HTTP_HOST} ^(www.)?example.com$
RewriteRule ^(/)?$ wp/index.php [L]
</IfModule>
just change example.com
and put this htaccess into PUBLIC_HTML folder (so, wordpress .htaccess
should be in wp
folder)