Remove blog folder name when keep wordpress inside cakephp webroot - wordpress

Due to some requirement I have to install wordpress in cakephp site, I installed it inside app/webroot/blog and after some modification I can access wordpress blog as
mysite.com/blog
Now the problem is that wordpress post url should not contain word "blog" ,currently they are as
mysite.com/blog/post_url.
They should be like
mysite.com/post_url.
I have open to install wordpress anywhere.
Thanks
Rich

Is your problem that you truly don't want the word 'blog' to appear in the url, or that you can't see your posts because their path is wrong? If the latter, you can fix it by changing the root path in the wordpress settings, add '/blog' at the end of your default path and all should be well.

Related

domain redirecting to localhost/wordpress

this is my first time, I am installing a wodrpress localhost(xampp) to main server.
According to tutorial I Imported database from local machine to main server. Changed the the table prefix and http://localhost/wordpress to https://example.com.
after installing theme domain shows empty theme.
I changed all the http://localhost/wordpress used on theme. But didn't work.
Then according to another tutorial I imported full localhost wordpress file.
Then It redirecting my domain to http://localhost/wp-wordpress. Then I decided to fully reinstall the wordpress and as per I removed file from public html which I uploaded.
Now my domain redirecting to http://localhost/wp-wordpress after removing files I uploaded.Public html folder
my site
After reinstalling wordpress on server admin dashboard working fine but domain redirecting to localhost/wp-wordpress
You can change the url many ways in wordpress. You can use to change the url as you understand and follow the steps as I mentioned in below,
Change WordPress URL in Admin Dashboard
Change WordPress URL in wp-config.php File
Change WordPress URL Directly in Database
Change WordPress URL With WP-CLI
Get More understanding the details, Follow the article - How to Change Your WordPress URL
Thanks!
After checking wp-config.php and site_url,home_url in wp_options table in database. Take a view on .htaccess file too. This file should look like this htaccess code
Please change the site_url from the wp_option table. There are 2 rows containing the website base url in the wp_option table. You need to change both url to the main domain url.
Thank you

Wordpress posts & pages using the wrong index.php

I've updated the main page for my site (http://www.goldfinchnj.com) to show the most recent posts from a wordpress site (http://www.goldfinchnj.com/news) The main page is mostly HTML, but I had to make it a .php file so it would pull in the 3 most recent posts.
The problem is all the pages & posts on the wordpress site seem to be using the index.php file from the root directory (the index for the main page).
Before this issue started, I changed the directory of the wordpress install. It was news.goldfinchnj.com, but I wanted it to be goldfinch.com/news.
Any ideas how to fix this?
How have you changed the directory? Have you updated all links in the database? Manually or you used search and replace plugin? Do you host wp on apache server? Do you have correct index.php in news subfolder and correct .htaccess?
Fixed it. Took another look at the .htaccess and had to update the path for the IfModule mod_rewrite.c

Change WordPress URL folder name to another without redirecting

I'm trying to change my WordPress site's URL (without redirecting) from:
example.com/go/take/
to:
example.com/go/give/
Also, if my wordpress site is located in the /go/ folder, is it possible for me to trim /go/ ?
Thank you.
These are two separate issues.
Regarding the first issue, are you saying that you still want a user
to type in example.com/go/take, but be served the file from
example.com/go/give without changing the url? You can install the
wordpress redirection plugin to do that. You can create a 'pass
through' redirect which will do this.
Here's what you can do to run example.com from a wordpress install
in the go subdirectory:
http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory

Moving Wordpress site subdirectory errors

I have just moved my testing development subdirectory worpdress installation to my root folder using the WP-Clone plugin.
The problem now is my main site (previously mysite.com ) shows (mysite.com/site) now. and the subdirectory is shwoing in all my links
I have tried going to settings and removed the /site from wordpress URL and Site address URL.
But it broke my site and disabled me from accessing my wp-login.php .
I fixed it by editing my wp-config.php and adding :
define('WP_HOME','https://mysite.com/site');
define('WP_SITEURL','https://mysite.com/site');
and now my website works perfectly. But it still shows mysite.com/site and i am unable to edit my URL and Siteaddress from my wp dashboard anymore.
How do I Remove my website subdirectory (/site) and still have it work and not break my site's themes and all? How do I go about this? Really really appreciate any help! Thanks!
By adding those constants to wp-config.php you're overruling any setting in the database. That's why you can't edit them in the admin panel.
So the first step is to change those constants to:
define('WP_HOME','https://domain.com');
define('WP_SITEURL','https://domain.com');
Then delete your htaccess file. (.htaccess in your root folder).
Once you've done this navigate to http://domain.com/wp-login.php
Login to your site and go to Settings -> Permalinks. Hit save which will regenerate your htaccess file.
Finally you'll need to update existing links. I'd suggest installing a plugin called 'Velvet Blues Update URLs'.

Wordpress blog doesn't show up online?

I have created a self-hosted wordpress blog and on my ftp server everything is under
/public_html/wordpress/..
then you have /wp-admin and /wp-content etc..
but when I got to my website the theme doesn't show up, it only shows a white page with
www.******.co.cc
" index of
/wordpress"
I figured out the wordpress blog has installed its own directory so if I want to see my website I need to enter that directory first. So I tried to type
www.*******.co.cc/wordpress/
and it worked my website is all here.
BUT ! I don't wanna have people to type www.**.co.cc/wordpress/ since the site was originially known without adding /wordpress at the end.
If I move all my wordpress folders under the root
/public_html .. will it work ??
See http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory to move the site to root.
After the move, if all you see is "index of...", add
DirectoryIndex index.php
at the top of .htaccess
Under Settings > General
Check your site address(url) and wordpress address(url) to make sure they are set how you want them.
The site address should have the url for where you want people to view the page (without the wordpress extension. )
You most likely also have to move your index.php and .htaccess file out of the wordpress file and into the root folder.
Go here: http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory and
View the instructions under the heading "Using a pre-existing subdirectory install"
It is good to have FTP running while you do this in case you lock yourself out of the admin by inserting an incorrect filepath.
This is because you have installed your wordpress script in the
public_html >> wordpress
Install your wordpress in the root i.e left the directory field empty
/

Resources