49

The solution I found that worked on my Mac running the built-in Apache2 was to add this to 'wp-config.php' define('FS_METHOD','direct'); Keep this to a localhost or dev setup and don't use it for production.


32

Because I had cut and pasted define(’FS_METHOD’,’direct’); from the web, the incorrect quote characters were pasted into the file. should be define('FS_METHOD', 'direct'); The incorrect quote character also changed the encoding of the file somehow. If anyone has deeper knowledge of this issue please let me know in the comments.


20

No, there is no security risk. Both files do sanity checks before anything happens. If WordPress is already installed: install-helper.php returns just a blank page. install.php says WordPress is installed and you should log in: You can forbid access to both files with a simple rule in your .htaccess above the permalink rules: RedirectMatch Permanent wp-...


8

There's not a correct order. Either way will work and results in a WordPress install that is secured with SSL. What makes sense in a situation, depends on the setup and workflow. If you can plan ahead, it's optimal to set up the SSL on your server first. Because doing so, you don't have to go back through WordPress, and change settings and the database. In ...


6

Always install the latest final version. This is the most secure version you can get. Older tutorials and guides should still mostly apply. If they don’t you will find enough replacements that are up to date.


6

This can be somewhat tedious, but hopefully this helps. The less that changes from one environment to the next, the less painful this process will be. Particularly, if the domain, site id, file paths remain the same, the less painful this process will be. This post assumes some knowledge of database management. It is not a complete step by step because you ...


5

I've answered a similar Question. Basically: create a Dropin plugin at the root of wp-content named install.php inside install.php, create a new version of the pluggable function wp_install_defaults() remove all unwanted defaults and customize at will, like: update_option('template', 'your-theme'); update_option('stylesheet', 'your-theme'); ...


5

After installing WordPress 5 on Debian 9 Stretch I updated (remotely on localhost) and was prompted for FTP details. Running these commands in terminal fixed the problem: chown -R www-data:www-data /var/www/html chmod -R g+rwX /var/www/html It's a file-ownership issue. Code and caveat from turnkeyLinux.com: Changing file permissions is a trade off ...


5

I'd highly recommend WP-CLI for such tasks. It is a tool that allows installation and configuration of WordPress on the command line. What you are trying could easily be done: wp core download wp core config --dbname=<dbname> --dbuser=<dbuser> --dbpass=<dbpass> wp core install --url=<url> --title=<site-title> --admin_user=<...


5

One of your old favourite songs from way back when For the fun of it, straight from the plugin page. This is not just a plugin, it symbolizes the hope and enthusiasm of an entire generation summed up in two words sung most famously by Louis Armstrong: Hello, Dolly. When activated you will randomly see a lyric from Hello, Dolly in the upper right of your ...


5

While this might be not the easiest task for a beginner, it is very well possible – with a little help from some plugins. In a similar scenario I would usually install WordPress under a subdomain. When everything is looking ok to launch, I would recommend to first (always!) make a backup of everything. You can then change the base url (domain) either ...


5

WordPress doesn't run on PHP 4. This version is 10 years old and completely broken by any current standards. You have to use a newer PHP version, there is no workaround. You can always look up the current requirements on wordpress.org. Right now, PHP 7.3 is recommended, but 5.6 might still work. If you can't change the PHP version, find a better host.


4

This is a permissions issue. Here are some steps to fix ownership and r/w permissions in a more secure way: // check what groups your username belongs to $ groups // if your username doesn't belong to www-data then add username to group $ sudo usermod -a -G www-data username // exit ssh session (or close terminal window if local) to make group change ...


4

As of WordPress 3.5, there is now an option to install plugins that you have 'favourited' on the wordpress.org plugin repo. Click the 'Favorites' link on the Install Plugins screen, and enter your wordpress.org username, then click 'Get Favorites'. You will be presented with a list of your favourite plugins on wordpress.org, which you can then install.


4

The problem was in the .htaccess file the installation script generated. Specificaly, those two lines: RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) home/itaymoav/dev/lmspages/$2 [L] RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ home/itaymoav/dev/lmspages/$2 [L] The path in there is the actual path to the files. While it had to be the relative ...


4

I got similiar situation where I needed to add page on theme activation and set it as homepage automatically. Here's how I did it: add_action('after_setup_theme', 'mytheme_setup'); function mytheme_setup(){ if(get_option('page_on_front')=='0' && get_option('show_on_front')=='posts'){ // Create homepage $homepage = array( ...


4

Searching for another thing, just stumbled upon this gem by @anmari :) You have to put a Dropin plugin at the root of wp-content. Should be named install.php and contain a new version of the pluggable function wp_install_defaults. I used this gist for testing. And the only modification from the original function is the default category name and slug. ...


4

I usually just run a function on wpmu_new_blog - best to put in mu-plugins function wpse_wpmu_remove_default_content($blog_id, $user_id, $domain, $path, $site_id, $meta) { if ( !current_user_can('manage_network') ) return; switch_to_blog($blog_id); // Remove the default post & page wp_delete_post(1, true); wp_delete_post(2, true); // ...


4

The basic idea should work-- change the prefix in both wp-config.php and in the database itself. What isn't covered would be cases where the prefix is used in other contexts such as when used as part of a "meta" key. Those cases you would need to trace down one by one. You could also have trouble it the prefix has been hard-coded into anything, but ...


4

On your old site go to Tools > Export in the admin area. You can select what you want to export. In your case "Posts." Click Download Export File On the new site you'll go to: Tools > Import > WordPress You'll have to hit a button to install the core plugin, but you can remove it after the import. Import the file you downloaded from the old site.


4

So you're asking if you install WordPress in a subdirectory, like example.tld/secretwp/ and have the site pointing to example.tld, it will keep "evil" users and bots from knowing about the subdirectory? I don't think it will hold as a security advise, because your site can give away the subdirectory name in many ways. For example from: the use of admin-...


4

Just to add to the answer by @birgire, check this post on how to hide the fact that you are using Wordpress. I also think that no post basically covers this, but it really help nothing following and applying everything to hide the fact you are using Wordpress and to secure Wordpress, and your code in itself is a security risk. Hackers are stubborn and ...


4

You are facing the error because the database tables have old domain stored in all tables and post meta data. You need to replace all instances of previous domain with the new one in the database, the following link will help: https://interconnectit.com/products/search-and-replace-for-wordpress-databases/ You should also update your permalinks after the ...


4

Assuming your domain is mydomain.org. Instead of installing WordPress under a different domain (wordpress.mydomain.org) you could install WordPress on your local machine (using XAMPP MAMP or a virtual box) and resolving the original domain to your local computer by editing your systems host file and add the following line: 127.0.0.1 mydomain.org Now ...


4

I normally just map my hosts file to the correct IP. This would work if you were only wanting to work on a site from your box only. Only benefit to this option, as opposed to others, is that you wouldn't need to change any of your Wordpress settings to go live.


3

Use plugins like : WP DUMMY CONTENT Easy generation and deletion of blog posts, pages, and sub pages for developers. Full site structure in one click. DEMO DATA CREATOR Demo Data Creator is a WordPress and BuddyPress plugin that allows a WordPress developer to create demo users, blogs, posts, comments and blogroll links. Well and of course this ...


3

If you have access to your host commandline and are running linux, why not pair wp_cli with a bash script. In this way you can have a fairly defined standard set of plugins to activate per install. wp plugin activate plugin_a wp plugin activate plugin_b wp plugin activate plugin_c Here's a WP_CLI and YT demo video: https://www.siteground.com/tutorials/...


3

What I generally do Install WP in sub directory. Open permalink set required permalink. Open settings->general link Remove the sub directory name from 'Site Address (URL)' Cut the index.php and .htaccess files from sub directory and paste them to root change code in index.php as you did. Again access settings->permalink save the form Done. You dont need ...


3

Update your wp_options table. Look for siteurl and home and change their values to point to your localhost, that is, http://localhost/mylocalsite. This should be enough to make your site work again. You don't need to find and replace all instances where the old url is present. For example you should not change the guid of your posts. Alse read this post ...


3

Note: there is no Version "3.04". There is a Version "3.0.4", though. The important thing to understand with WordPress version numbers is that, unlike many software applications, the latest major version is not Version X, but rather, Version X.Y. So, in WordPress, Version X.0 is no more important, stable, or secure than Version X.1 (and in fact, generally ...


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