14

Default wp_enqueue_[style/script]() behavior The default value for the $version argument of wp_enqueue_style() is false. However, that default just means that the stylesheets are given the WordPress version instead. Solution Thanks to "Remove version from WordPress enqueued CSS and JS", I learned the undocumented fact that passing in null as a version ...


10

Open wp-config.php Now the first thing you need to do is to open the wp-config.php file from your WordPress root folder (you may access this file from your WordPress installer folder). From the installation folder, the file is located at wordpress/wp-config.php 2. Insert FS_METHOD Paste the following code to your wp-config.php file, preferably just below ...


8

Thank you for your post, mrwweb. I found another solution to this, by creating a very simple plugin you can deactive when the site is no longer under development. <?php /* Plugin name: Strip WP Version in Stylesheets/Scripts */ function switch_stylesheet_src( $src, $handle ) { $src = remove_query_arg( 'ver', $src ); return $src; } ...


5

If you are using MAMP Pro you can simply just add another completely new host using your sub-domain and then just route it to the same place as your top domain. You won't have to add any virtual hosts in your original domain, or have to stuff around with your hosts file.


5

Use if( file_exists(plugin_dir_path(__FILE__) . 'myfile.ext') ) {} instead of if( file_exists( plugins_url( "myfile.ext", __FILE__ ) ) ) {} See plugin_dir_path in the Codex.


5

You are trying to access the install via a file url: file://home/cnorton/scratch/install.php.html That is not going to work. That bypasses the web server and you need the webserver to process the request and pass things to PHP, which then passes the generated page back to the server for delivery to the client (your browser). You need to access the file ...


5

Make sure you don't have installed and activated a plugin that forces a redirection to HTTPS, for example, the Really Simple SSL. If you have one, deactivate it on the localhost by renaming the plugin folder name, e.g. rename it from "really-simple-ssl" to "really-simple-ssl_deactivated". Now you should be able to access your wp-admin URL.


4

You could use slugs instead of IDs. Taken from the Starkers theme (add it to your functions.php): add_filter( 'body_class', 'add_slug_to_body_class' ); function add_slug_to_body_class( $classes ) { global $post; if( is_home() ) { $key = array_search( 'blog', $classes ); if($key > -1) { ...


4

Parts of WordPress use (s)FTP to transfer files. Updates, for example, use (s)FTP. Media uploads do not, at least not unless something has changed in 3.7. If you are connecting to an (s)FTP server you have to provide the credentials that that server needs. Your file permissions won't come into play until after that connection is made. There are constants ...


4

Well, at my situation... I downloaded the company website from production to localhost because I was needed to prepare a development environment for some developers. The production is using https:// and at localhost http://, and when I ran it the first time on localhost, it always redirected me to the https://. And, I have managed to made this working on my ...


3

I was facing this issue. This post helped me. There could be multiple reason: Permission issue on the files and folders. The FS_METHOD should be "direct" in wp-config.php file. Remove FTP configuration from wp-config.php if you are migrating from bitnami to manage it on your own. For me it was bitnami related settings issue.


3

Since 2018, I have been developing all my WordPress themes with parcel. It does accept javascript files as an entry points (or even multiple of entry files). In your console: $ parcel ./path/to/your-theme-script.js ...or for development: $ parcel watch ./path/to/your-theme-script.js ...import your styles in your main file like this: import './scss/app....


2

I'd like to add an advantage of WAMP that is not listed. With WAMP you can install extensions* that allow you to easily switch between different versions of php. Since WordPress's minimum requirement is php 5.2.4 and guarantees it will run on a server using it, to be truly compatible with WordPress a plugin needs to run under that version of php. There are ...


2

"MySQL server has gone away for..." This should never happen as result of admin operation on vanilla wordpress. One post publishing should not include enough DB writes to make the DB go away. Have you tried with all plugins inactive? Hey, is there a way I can host all the WP-admin functions locally, and simply push changes to the remote server? ...


2

Check the 'siteurl' and 'home' values in your wp_options table, and update those URLs to: http://localhost:8000/wordpress


2

The steps to take would be: 1 - Extract files 2 - Create DB and import 3 - modify wp-config.php for database name and user credentials if changed Do not modify db tables to change the site url as they are serialized and this will create more issues than you want to deal with. 4 - Use a script like searchreplacedb.php to search and replace all of the ...


2

I had same issue today on my new server. After a while i realize that zip/unzip is not active in my apache/php . When i recompile my apache with zip extension , problem solved.


2

Faster! My local WAMP install is SLOW, no matter CPU, RAM & SSD! Dedicated VPS solutions are x times faster than a local install. This isn't right. Typical hosting out there would be resource–limited and much inferior in performance to a decent desktop. You just might configuration issues or overestimate your hardware (time for upgrade? :) Staging ...


2

You need the VVV Custom site template to enable multisite. And you have to let the main Vagrant instance load it automatically. Open the vvv-config.yml in the main directory, under sites: add the following entry: msvagrant: repo: https://github.com/Varying-Vagrant-Vagrants/custom-site-template hosts: - msvagrant.dev - en.msvagrant.dev ...


2

It looks like you're connecting to the live database from your local machine. Not many hosts allow remote connections to the database by default. You may have to request this type of access from your host. Also, it's highly recommended you work with a local copy of your database instead of connecting (and possibly changing) your live database. By the way,...


1

It is the same procedure as going from local to live website. Supposing that you are using a Windows Machine, when downloading a Bitnami Wordpress Installer, it creates a folder in C directory and than you can overwrite all the files with the downloaded ones execpt wp-config.php, After the phpMyAdmin installation where you must import the downloaded ...


1

Normaly on servers you can install WP with WP installation proccess and you will have auto generated wp-config.php file. On some servers you need to create wp-config.php manualy. Here is how to prepare WordPress installation: In MySQL you need to create empty database Place in root of your server WP ZIP file Extract ZIP file with some zip manager Move WP ...


1

The directory /wp-content/ of your local installations needs permission to create directory. It is necessary to upload the package and unpack. rights Maybe this should helps, if the user is www-data. chown -R :www-data /var/www/html/wordpress/wp-content/uploads chown -R :www-data /var/www/html/wordpress/wp-content/upgrades Or full access to the wp-...


1

Via phpMyadmin Go to MySQL Admin Enter to phpmyAdmin with your user and password of your WP config access Create a sql backup Go to your phpmyAdmin on your live server and on a new Worpress install database upload your home SQL backup, this contains all your data and setting of your local WP copy the full folder content via ftp, this will include all ...


1

Hopefully I can be of a little help. Taking a look at the InstandWP website, it appears to be an install version of WordPress that installs into a directory, and then contains all settings etc for the site to run in a local environment. I am not sure on the file structure of InstantWP, so I would assume that it essentially just creates a version of ...


1

Leave your database alone. Instead insert two lines in your wp-config.php on the local server: define('WP_HOME','http://yourlocalserver/yoursite'); define('WP_SITEURL','http://yourlocalserver/yoursite'); The rest of what you are doing probably doesn't matter and editing the SQL export is prone to error so you could easily be breaking things.


1

Try restarting the services. If you still get the error of Error establishing a database connection, open wp-config.php and check if you have entered the proper database details (username, password, database name, host)


1

I think your process for migrating to the live server was sound. I'm pretty sure that your issue is with step #2, more specifically the replacing of local URLs with the server URLs. While you likely replaced all of the URLs correctly, it's possible that the serialized data in the database didn't get changed to reflect the change in the server URL. I like to ...


1

Assuming you are on Linux, you need to make some changes in apache2.conf file stored in /etc/apache2 directory. Open the file with root permissions, you will find the code given below in the file. <Directory /var/www/> Options Indexes FollowSymLinks AllowOverride None Require all granted </Directory> Here just change the ...


1

WP uses the GUID column of posts for links. You need to replace that, I use a script http://interconnectit.com/products/search-and-replace-for-wordpress-databases/ Just drop it in your root dir then follow the instructions. Hope this helps!


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