Jump to content

moving site from sub folder to the root directory


Alex
 Share

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

Link to comment
Share on other sites

  • 1 month later...

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?

Link to comment
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!

Link to comment
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.

Link to comment
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. :)

Link to comment
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.

Link to comment
Share on other sites

  • 1 year later...

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
Link to comment
Share on other sites

  • 5 years later...
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
Link to comment
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
 Share

×
×
  • Create New...