Jump to content
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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By Robin S
      After forgetting the class name of the wonderful AdminPageFieldEditLinks module for what feels like the 100th time I decided I needed to give my failing memory a helping hand...
      Autocomplete Module Class Name
      Provides class name autocomplete suggestions for the "Add Module From Directory" and "Add Module From URL" fields at Modules > New.
      Requires ProcessWire >= v3.0.16.
      Screencast

      Installation
      Install the Autocomplete Module Class Name module.
      Configuration
      Add Module From Directory
      Choose the type of autocomplete suggestions list: "Module class names from directory" or "Custom list of module class names". The latter could be useful if you regularly install some modules and would prefer a shorter list of autocomplete suggestions. The list of class names in the modules directory is generated when the Autocomplete Module Class Name module is installed. It doesn't update automatically (because the retrieval of the class names is quite slow), but you can use the button underneath when you want to retrieve an updated list of class names from the directory. Add Module From URL
      If you want to see autocomplete suggestions for the "Add Module From URL" field then enter them in the following format:
      [autocomplete suggestion] > [module ZIP url]
      Example: RepeaterImages > https://github.com/Toutouwai/RepeaterImages/archive/master.zip Awesomplete options
      The "fuzzy search" option uses custom filter and item functions for Awesomplete so that the characters you type just have to exist in the autocomplete suggestion item and occur after preceding matches but do not need to be contiguous. Uncheck this option if you prefer the standard Awesomplete matching. Custom settings for Awesomplete can be entered in the "Awesomplete options" field if needed. See the Awesomplete documentation for more information.  
      https://github.com/Toutouwai/AutocompleteModuleClassName
      https://modules.processwire.com/modules/autocomplete-module-class-name/
    • 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? 
       
       
×
×
  • Create New...