Alex

moving site from sub folder to the root directory

Recommended Posts

I have been building my site in a sub folder called 'pwire'

Can I move the site to my root folder, what is the best way to do it?

I had a search around the forums and main site but can't find a reference for this.

I figure it might be the settings in index.php in the site folder?

Alex

Share this post


Link to post
Share on other sites

You only have to move all the folders and files from inside 'pwire' to the root. Make sure you move also the hidden .htaccess

  • Thanks 1

Share this post


Link to post
Share on other sites

great thank-you. As usual these things are easier than I thought.

Share this post


Link to post
Share on other sites

Hi everyone. I'm trying to do the same thing on my localhost but it's not working for some reason.

I had the install in a folder called processwire so I have to go to localhost/processwire to access it.

I'm trying to move everything as mentioned to the root directory, which includes:

  • .gitignore
  • .htaccess
  • index.php
  • site (folder)
  • wire (folder)

I moved everything including the .htaccess file but when I navigate to localhost I get a server error.

Am I missing something?

I've included some screenshots.

Thanks for your help.

post-466-0-53754600-1331405445_thumb.png

Everything works fine at localhost/processwire.

post-466-0-18729900-1331405447_thumb.png

Not working. Does having folders "images" and "fonts" affect this? Is there a better place for me to put these?

Share this post


Link to post
Share on other sites

Having the images and fonts directories there shouldn't be a problem. More likely it's a problem in your server setup. What error message do you get?

Share this post


Link to post
Share on other sites

Must be the permissions. Give maximum permissions recursively to all the folder to see if it works, and then adjust them to the required ones. If you need help for doing it on mac, check here http://support.apple.com/kb/HT2963

EDIT: And welcome to the forum :)

Share this post


Link to post
Share on other sites

Having the images and fonts directories there shouldn't be a problem. More likely it's a problem in your server setup. What error message do you get?

Yes, I think it's my setup. The error message was "Server error" in Google Chrome. It said it may have been configured incorrectly.

Must be the permissions. Give maximum permissions recursively to all the folder to see if it works, and then adjust them to the required ones. If you need help for doing it on mac, check here http://support.apple.com/kb/HT2963

EDIT: And welcome to the forum :)

I think you're right about the permissions issue. I wasn't sure how to modify the permissions but my computer has been running slowly. I did a disk repair and a restart and it's fine now. I'm using MAMP for local development and it usually prompts me for my password if I make changes to anything. Maybe I should've restarted MAMP? I'm not sure. Anyhow, I repaired my disk because there were errors and thus restarted my computer. Everything is fine now. Not sure what fixed it but I'm going to assume restarting MAMP helps.

Thanks for your help.

One more thing: Is there a way to give MAMP full administrative privileges so that it doesn't have to prompt me for my password in the case (like this one) where it doesn't?

Thanks!

Share this post


Link to post
Share on other sites

I don't use Mac, so I can't help you here. Let's wait that MAMP users appear :)

Share this post


Link to post
Share on other sites

Hey tinacious, are you using virtual hosts for instance? you have to change that. Also, if you forget, any hardcoded reference (or php code based on non-hardcoded base URL) has to be changed. Not to point out the obvious, but we also (often? :) ) overlook the basics.

Share this post


Link to post
Share on other sites
One more thing: Is there a way to give MAMP full administrative privileges so that it doesn't have to prompt me for my password in the case (like this one) where it doesn't?

I don't know if there is a way to do that, but I also use MAMP here and it only prompts me for the password when I restart apache or reboot. I might do this once a month or so. The password isn't too bothersome if you don't reboot often. :)

Share this post


Link to post
Share on other sites

One more thing: Is there a way to give MAMP full administrative privileges so that it doesn't have to prompt me for my password in the case (like this one) where it doesn't?

It's because OS X (and other *nix systems too, I think) require root password (or root access) for anything that's accessing (or broadcasting) through ports lower than 1024.

Share this post


Link to post
Share on other sites

Thanks everyone for all of the explanations about MAMP. :) You've all been a great help, thanks!

Share this post


Link to post
Share on other sites

Upon moving ProcessWire into the root folder like mentioned above I get an error:

Parse error: syntax error, unexpected T_VARIABLE in /www/index.php on line 105

line 105 says:

    $config->paths = clone $config->urls;
 

Anything else I need to change to get it back working?

Edit: fiddling with .htaccess solved the problem.

Edited by BFD Calendar

Share this post


Link to post
Share on other sites
On 2/4/2012 at 9:24 PM, diogo said:

You only have to move all the folders and files from inside 'pwire' to the root. Make sure you move also the hidden .htaccess

In case anyone is researching this topic, I can attest that this works beautifully on a live site! It was such a smooth and painless process! 😂😍

I used Diogo's advice to go from Wordpress to Processwire on a site that I wanted to switch over. I had less than a minute or two downtime. Firstly, over a week or two, I built the Processwire version of the site in a subfolder (used a hard-to-guess-name) with the Wordpress version still running live in the root.  Then when I was happy with the look of the Processwire version, I deleted the Wordpress installation via 1 click in Softaculous, which gets rid of the Wordpress database and the files, and leaves behind your own folders, like my staging subfolder containing the Processwire site. Then I just moved the contents of that staging subfolder up one level, into the document root. It renders just like it should. Done, and done. Thanks, diogo.

  • Like 4

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By gregg
      While trying to install 3.0.123, i encountered the following error: 
           Parse error: syntax error, unexpected '[' in /home/naucom5/public_html/wire/core/FunctionsAPI.php on line 469
      In cPanel, i extracted the zip file to 'public_html', which created the directory 'processwire-master', and then moved the files from 'processwire-master' to 'public_html' (which previously had 1 unrelated directory).
      Installation went well choosing Uikit profile, including connecting to database. Compatibility check ok (mod_rewrite error cleared after recheck), successful database connection, config.php saved, unchecked a few cleanup items, then the error message.
      Any suggestions appreciated. 
    • By Inxentas
      I love the option to export fields via the CMS, and wondered about using that export data in a module. Basicly, I'd want to configure a field using the CMS and then paste it's export data in the module code as a string, or save it in a seperate file I can read from the module code. Once I have that string as a variable or file, I'd want to run the same code the import option does... but then from my module code's install method!
      Is that possible? It would save a lot of time configuring fields through the API.
    • By Ahmad
      Hello,
      I have problem when i add www to the domain.
      i add www in config file, but the problem the $config->urls->root ,    output  is "domain.com" doesn't "www.domain.com"
      what is the wrong??
    • By Kemal
      Hi,
      Probably easy question but i want to learn all the ways to do it.
      i uploaded ads.txt file to www.xxx.com/site/templates/ folder!
      now i want to open it from www.xxx.com/ads.txt
      how can i do it? 
       
       
    • By Johannes P.
      Dear all,
      My name is Johannes and this is the first time I'm posting something in this forum.
      I get following error installing Processwire 2.7 in a subfolder:
      exception.txt:
      2017-09-14 13:37:27    ?    ?    Missing system template: 'permission' (in /wire/core/ProcessWire.php line 262)
      error.txt
      2017-09-14 13:59:35    ?   http://www.domain.com/?/  Error:     Exception: Missing system template: 'permission' (in /data/www/www.domain.com/docfinder/wire/core/ProcessWire.php line 262)
      I have used "processwire-legacy-master.zip". Please see also the screenshots from the installing process:
      Hoster is Plusserver (formerly HostEurope) on Linux and Apache/mysql.
      I have tried also to install 2.8.62 but result in the same error. 

      Any ideas? Should I try to install the most recent versin of Processwire? I have to migrate an existing page to this new server, thats why I used the version 2.7
      Best
      Johannes