News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Got a bit of a pickle with Wordpress, SMF, and Woocommerce sharing a directory

Started by Jade Elizabeth, June 12, 2016, 06:38:38 PM

Previous topic - Next topic

Jade Elizabeth

So I have SMF running on my root domain, which we will just call myforum.com for now. Then I have my Wordpress at myforum.com/blog and then I have woocommerce (an extension for wordpress) at myforum.com/blog/store (because it goes based on the wordpress location).

I've come up empty handed to find a way to make it myforum.com/blog (for wordpress) and myforum.com/store (for woocommerce) asside from making WP the root (it seems there's no way to make woocommerce stand alone, like you could do with say Simple Portal)....but my domain is myFORUM not my blog/store so I really don't want to do that.

Do you guys know of a way I can get SMF and WP to share the root directory or another way I could address this pickle? :D
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Kindred

they absolutely CAN NOT share the same directory. There is no way to do that.

Your option would seem to be to move the forum to a subdirectory and move worpress to the root...   
yet another reason to hate wordpress....   it always assumes that it is the only thing running on the site.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Antes

If your SMF forum does not using any SEF addition, just do rename trick on index.php and rename it to forum.php, move WP to root.

Quote from: Kindred on June 12, 2016, 06:44:11 PM
they absolutely CAN NOT share the same directory. There is no way to do that.

Your option would seem to be to move the forum to a subdirectory and move worpress to the root...   
yet another reason to hate wordpress....   it always assumes that it is the only thing running on the site.

Open QueryString and rename index.php (// Makes it easier to refer to things this way.) to forum.php (and rename the index.php to forum.php)

Kindred

Ok, so maybe I was incorrect about making an absolute statement...

But that will cause lots of issues, especially with mods
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Antes

Quote from: Kindred on June 12, 2016, 06:56:57 PM
Ok, so maybe I was incorrect about making an absolute statement...

But that will cause lots of issues, especially with mods


Well you are correct about it, but most of the mod authors should be following $scripturl standard on stuff... :P

Illori

if any files names in the same location are used by both wordpress and SMF this would not work easily.

Antes

Quote from: Illori on June 12, 2016, 08:36:22 PM
if any files names in the same location are used by both wordpress and SMF this would not work easily.

WP & SMF using different files. Last time I check there wasn't any. Also afaik WP allow you to move files (exc. index.php to another folder).
+ You can always move SMF files to another folders as well. Similar to this site.

nend


Jade Elizabeth

Quote from: Antes on June 12, 2016, 06:47:26 PM
If your SMF forum does not using any SEF addition, just do rename trick on index.php and rename it to forum.php, move WP to root.

Quote from: Kindred on June 12, 2016, 06:44:11 PM
they absolutely CAN NOT share the same directory. There is no way to do that.

Your option would seem to be to move the forum to a subdirectory and move worpress to the root...   
yet another reason to hate wordpress....   it always assumes that it is the only thing running on the site.

Open QueryString and rename index.php (// Makes it easier to refer to things this way.) to forum.php (and rename the index.php to forum.php)

Hmm that's very interesting!

I wonder if that will work with Pretty URLs.

I do want myforum.com to show the forum though, so unsure.. this will cause it to show wordpress wouldn't it? Maybe I should do what you said later and look into moving Wordpresses index or something.

Quote from: Antes on June 12, 2016, 09:00:46 PM
Quote from: Illori on June 12, 2016, 08:36:22 PM
if any files names in the same location are used by both wordpress and SMF this would not work easily.

WP & SMF using different files. Last time I check there wasn't any. Also afaik WP allow you to move files (exc. index.php to another folder).
+ You can always move SMF files to another folders as well. Similar to this site.

Yes I will keep Permalinks to /blog and /store but I need the root to make it happen in a way that's not fugly and confusing lol.

Quote from: nend on June 13, 2016, 01:13:14 AM
modrewrite?

I was thinking about that... That's the only option I was seeing in the beginning but I honestly don't know how to do it.
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Antes

Quote from: nend on June 13, 2016, 01:13:14 AM
modrewrite?

I don't know if you can configure modrewrite to work with index.php & forum.php on same dir same time.

Jade Elizabeth

No if I used Modrewrite I could get it to show /blog/store as /store, and since /blog is already there then there's no issue. I wouldn't need to change any of the setup just add the rewrite. Yeah? Am I thinking of that right?
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

nend

I believe this should do the trick.
RewriteRule ^store/?(.*)$ ./blog/store/$1 [L,QSA]

Now you just have to get the links in the store to reflect this.

Jade Elizabeth

Hmm it's not working but I'm not sure that's your fault... For some reason Woocommerce is ignoring my shop base being /store and putting in /shop. Even when I change that part though it doesn't work.

Do you want a link to troubleshoot? I've coded them because it's not public yet.

http://www.colormeforum.com/blog
http://www.colormeforum.com/blog/shop/ <For some reason forcing shop, I'm googling this
http://www.colormeforum.com/blog/store/foodie-mandala-coloring-page/

These should work but don't..
http://www.colormeforum.com/store/
http://www.colormeforum.com/store/foodie-mandala-coloring-page/



EDIT: the "shop" url fixed now, they all say store all the time now :D.
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Jade Elizabeth

Is this part to do with SMF? I'm using pretty URLs so it will probably be looking for /store.
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Jade Elizabeth

Nend I am hoping you may have a chance to look at this a little and let me know if I've done something wrong or overlooked something? :D
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Jade Elizabeth

I got modrewrite to work but it's breaking things in wordpress AND wordpress still links to the original URLS...I'm not sure how to change that.

Quote from: Antes on June 12, 2016, 09:00:46 PM
Quote from: Illori on June 12, 2016, 08:36:22 PM
if any files names in the same location are used by both wordpress and SMF this would not work easily.

WP & SMF using different files. Last time I check there wasn't any. Also afaik WP allow you to move files (exc. index.php to another folder).
+ You can always move SMF files to another folders as well. Similar to this site.

If wordpress allows this is it possible to rename index.php to blog.php perhaps and have it share smfs directory?
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Jade Elizabeth

Okay so I have been following some guides

https://codex.wordpress.org/Giving_WordPress_Its_Own_Directory
https://codex.wordpress.org/Changing_The_Site_URL

With my htaccess entry from before the store is working 100,000% perfectly! BUT when I go to /blog it says page not found.

My new Wordpress htaccess is:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /blog/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /blog/index.php [L]
</IfModule>

# END WordPress


I am wondering if anyone understands better than be how to rename the index file...I have to copy it into the root so I was just going to rename it blog.php but I wanted to keep it index.php in the wordpress directory. Maybe that's impossible I am not sure ha ha.
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Advertisement: