Hot answers tagged

37

In Craft 3: You can download the latest Craft 3 release in zip or .tar.gz format by going to: https://craftcms.com/latest.zip https://craftcms.com/latest.tar.gz Or since Craft 3 is Composer based, you can modify your composer.json's craftcms/cms line to install the specific version you're looking for. In Craft 2: You can get the latest Craft 2 version ...


9

Relevant link: http://buildwithcraft.com/help/license-enforcement But the TLDR is that purchases are tied to your craft/config/license.key file and the purchase will follow that file wherever it goes. So as long as your replication script ignores that file, you'll get a fresh one tied to Craft Personal Edition the first time that Craft sees it's has an ...


9

I changed the .htaccess-file after I found the same problem with cakePHP. I just had to add RewriteBase / after RewriteEngine On so the .htaccess looks like: <IfModule mod_rewrite.c> RewriteBase / # Send would be 404 requests to Craft RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} ...


9

Because files that start with a . are considered "hidden" by many file systems (specifically OSX default). If the file is hidden, then there's a good chance that the user won't know about it, and won't be able to FTP it to the server. It's better for the file to be intentionally misnamed, rather than accidentally hidden.


8

9 times out of 10, if you're absolutely sure the path is correct, it's either a permissions issue (PHP doesn't have permissions to open the craft folder) or your php.ini file has open_basedir restrictions in place preventing PHP from accessing the folder.


7

Typically the Craft logs are stored here: /craft/storage/runtime/logs I don't know how much logging the installer does, but if it does any at all, that's where you'll find the log data. In the meantime, you can also try this script by Ben Croker which will check your server configuration to make sure it has everything it needs to proceed.


7

Did you try this? "If you’re getting a 404, your server might not be configured to redirect would-be 404’s to index.php correctly. Try going to http://example.com/index.php/admin or http://example.com/index.php?p=admin instead."


7

On recent Ubuntu systems (for sure on 14.04), mod_rewrite is installed but not enabled within Apache. You may just need to enable the rewrite module and restart Apache. $ sudo a2enmod rewrite $ sudo service apache2 restart


7

You can just rename web/ to public_html/, or move all the files inside web/ into public_html/. (Don’t forget to move the .htaccess and .env files, if the latter.) As long as the location of the public_html/ folder is in the same place as the web/ folder was, you don’t need to change anything else. my-project.test/ ├── config/ ├── ... └── public_html/ ├─...


6

Here's all you need: http://topicdesk.com/downloads/mcrypt/mcrypt-download Works like a charm. Update: to use brew, you have to specify the version of PHP for it to work. For example: brew install mysql php54-mcrypt


6

There is no "this over that" for Craft specifically. Your own statement "it depends" plays a big role. I would read this pretty extensive post on DigitalOcean "Apache vs Nginx: Practical Considerations" as a good start on what software to use. https://www.digitalocean.com/community/tutorials/apache-vs-nginx-practical-considerations For me personally this ...


6

Putting aside Craft for a moment, it's not just Craft, you'll usually end up throwing more things on a web server as time goes by. If those scripts/apps are expecting an .htaccess file and you're using nginx, you have to do some extra work to get those rewrite rules or additional pieces of magic working. As someone who cut his teeth on Apache, I've swung ...


6

Here's a tutorial on setting up your first Craft CMS 3 project. I'm a little sad that it didn't come up in any Google searches :( Setting up a New Craft CMS 3 Project


5

The cause of this is most likely an overloaded (very common if this is a shared hosting account) or misconfigured MySQL server. The installer itself should only take 10-20 seconds on 99% of hosts. However on this one, it sits for about 120 seconds, before Apache redirects the AJAX request to: 'p' => 'internal_error.html', As seen from your log files. ...


5

Update: Am I allowed to change my mind on this? :) My original answer didn't take into account storage/logo, storage/backups and anything else that a plugin might be storing in the craft/storage folder. So it's probably going to be much cleaner and safer to have CRAFT_STORAGE_PATH point to the shared file system. I would set CRAFT_STORAGE_PATH and have ...


5

It's not so much that you can't have the index.php file in a subfolder that might be an issue; it is that you can't put the craft folder above your webroot. If you have access to the folder that htdocs is inside, you should try putting the craft folder inside that. It might not be obvious, but there's no reason that the public folder has to be named public. ...


4

The log file got me on my way after a tip from Brad Bell: 'CDbException' with message 'CDbCommand failed during the SQL statement: SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'craft_assetfiles' already exists' in ...craft/app/framework/db/CDbCommand.php:358 Removing the database and doing a fresh install solved the issue.


4

All of Craft's log files get stored in craft/storage/runtime/logs. If you're running in devMode, then any log message with a trace, info, warning or error severity error will get logged there in addition to lots of database profiling information. If devMode is off, only warning and error get logged. Installation is a special exception to this config ...


4

If your permissions are set correctly, your php.ini is all correct, your craft folder exists and everything seems like it should work fine... Make sure you have the app folder inside the craft folder as well. You'll get the "Could not find your craft/ folder." if there is no app folder.


4

The short answer is, we should probably update that :) The long answer is: The homepage is a “Single” section, and originally, Singles couldn’t have dynamic Title fields like Channel and Structure sections; their titles were static, based on the section’s name. So in this case, that Homepage entry’s title was “Homepage”, and the only way to change that ...


4

After checking out the craft/app/etc folder, I noticed the cache folder was missing. It turns out that the problem was with my FTP client ignoring folders named "cache". So really a dumb mistake on my part. Thanks for your help @BradBell!


4

I found a solution! I had my local environment setup with homebrew following this article's instructions. After looking at the php error logs, I uncommented always_populate_raw_post_data = -1 in the php.ini file found in /usr/local/etc/php/5.6. I then restarted the brew services with brew services restart php56 (install brew services by tapping gapple/...


4

I'm on a Windows 10 environment with WAMP installed and I had exactly the same problem. Front End failed. Back End worked fine. News links failed. Clicking on website name link from the Localhost screen reveals directory contents. No matter how many times I kept clean installing Craft and tweaking and adding .htaccess files, the problem remained. I solved ...


4

Yes, you can change the name of the craft folder. In the index.php file in the public folder update the path for the craft folder in the $craftPath variable. I use the following naming scheme for my sites: // Path to your craft/ folder $craftPath = '../craft-domainname'; So my server directory looks something like this: /(server-root) --craft-domain1 ...


4

Talked with Justin via DM on the Craft Slack. As per that discussion, here was the solution: The Valet docs are extremely misleading. When detailing how to use the park command, they list running laravel new blog as one of the steps. This command has to do with creating a Laravel site and is not necessary at all (and in fact, as seen in this instance, ...


4

Absolutely! In fact, you've outlined the steps needed to do so... Rename craft folder Change $craftPath value in index.php That's it!


4

While Craft 3 is still in beta, the only way to install it is via Composer. If you’re unfamiliar with Composer, it’s a package manager (like npm) that attempts to make installing and updating PHP libraries easy via terminal commands. Here's an abbreviated form of the steps found in the Craft docs on installing Craft 3: Download Composer on your VPS (...


4

You need to configure your webserver/virtualhost to point to the /web directory. For apache you have DocumentRoot: your_disk_path/web For nginx you have root: your_disk_path/web


4

This article might be of use to you: Setting up a New Craft CMS 3 Project The DEPLOYMENT section talks about using Composer to install our dependencies, and not checking them into Git. That means a .gitignore that excludes vendor/ This isn't really a right or wrong situation, but rather that the advantages slightly outweigh the disadvantages, imo. If you ...


3

I'm documenting this here in case it helps someone else. My white screen during installation was caused by a missing comma between array items in my general.php and db.php config files. Once I added it, the install page loaded correctly.


Only top voted, non community-wiki answers of a minimum length are eligible